joyce8/EMBER2024-capa huggingface dataset:
Function at 0x413e55
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41bbf8], ebx
push esi
push edi
jne 0x413ed5
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x413f10
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x41bbf8], eax
je 0x413f10
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x41bbfc], eax
call esi
cmp dword [0x41b9c0], 2
mov dword [0x41bc00], eax
jne 0x413ed5
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41bc08], eax
je 0x413ed5
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x41bc04], eax
mov eax, dword [0x41bc04]
test eax, eax
je 0x413f1a
call eax
test eax, eax
je 0x413f01
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41bc08]
test eax, eax
je 0x413f01
test byte [ebp - 8], 1
jne 0x413f1a
cmp dword [0x41b9cc], 4
jb 0x413f14
or byte [ebp + 0x12], 0x20
jmp 0x413f39
xor eax, eax
jmp 0x413f49
or byte [ebp + 0x12], 4
jmp 0x413f39
mov eax, dword [0x41bbfc]
test eax, eax
je 0x413f39
call eax
mov ebx, eax
test ebx, ebx
je 0x413f39
mov eax, dword [0x41bc00]
test eax, eax
je 0x413f39
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41bbf8]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4144ee
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.0040cd30
mov eax, dword [0x41a42c]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.00413730
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x1008], eax
je 0x414621
push 2
push esi
push dword [ebp + 8]
call fcn.00413730
add esp, 0xc
cmp eax, ebx
je 0x414621
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x4145c1
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.0040d280
push 0x8000
push dword [ebp + 8]
call fcn.00414761
add esp, 0x14
mov dword [ebp - 0x100c], eax
cmp edi, ebx
mov eax, ebx
jge 0x414577
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push dword [ebp + 8]
call fcn.00412e8e
add esp, 0xc
cmp eax, 0xffffffff
je 0x414597
sub edi, eax
test edi, edi
jg 0x41456f
jmp 0x4145af
call fcn.0040fdca
cmp dword [eax], 5
jne 0x4145ac
call fcn.0040fdc1
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0x100c]
push dword [ebp + 8]
call fcn.00414761
pop ecx
pop ecx
jmp 0x414609
jge 0x414609
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00413730
push dword [ebp + 8]
call fcn.0040c82f
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x414609
call fcn.0040fdc1
mov dword [eax], 0xd
call fcn.0040fdca
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 0x1008]
push dword [ebp + 8]
call fcn.00413730
add esp, 0xc
mov eax, esi
pop edi
jmp 0x414623
mov eax, ebx
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00412b0a
leave
ret
Function at 0x401000
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
lea eax, [esp]
push eax
push 0x20019
push 0
push str.SoftwareGamingEmpireClassic
push 0x80000002
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x100
mov byte [0x40b780], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401063
lea ecx, [esp + 4]
push ecx
push 0x40b780
lea edx, [esp + 0x10]
push edx
push eax
mov eax, dword [esp + 0x10]
push str.Folder
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x40b780
add esp, 0xc
ret

Function at 0x401070
Capabilities:
Set registry value

Disassembly:
push ecx
lea eax, [esp]
push eax
push 0x20006
push 0
push str.SoftwareGamingEmpireClassic
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4010ce
mov edx, dword [esp + 8]
mov eax, edx
push esi
lea esi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4010a0
mov ecx, dword [esp + 4]
sub eax, esi
push eax
push edx
push 1
push 0
push str.Folder
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
pop esi
je 0x4010d2
mov edx, dword [esp]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop ecx
ret
mov eax, dword [esp]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop ecx
ret

Function at 0x401170
Capabilities:
Set registry value

Disassembly:
lea eax, [esp - 0x104]
sub esp, 0x104
push eax
call fcn.004010f0
lea eax, [esp + 4]
add esp, 4
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401190
sub eax, edx
mov edx, dword [esp + 0x108]
push eax
lea ecx, [esp + 4]
push ecx
push 1
push 0
push str.Folder
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x4011eb
push eax
lea eax, [esp + 4]
push str.Error__d
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push str.Error
lea ecx, [esp + 8]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
add esp, 0x104
ret
mov eax, 1
add esp, 0x104
ret
Function at 0x403024
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x403051
test byte [esp + 8], 0x80
je 0x40303f
and eax, 0xfffffffe
jmp 0x403042
or eax, 1
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x403062
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004047da
pop ecx
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x40308a
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x409378
call fcn.0040524c
mov edi, 0x94
mov eax, edi
call fcn.004053b0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x40b8b0], ecx
mov eax, dword [esi + 4]
mov dword [0x40b8bc], eax
mov edx, dword [esi + 8]
mov dword [0x40b8c0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x40b8b4], esi
cmp ecx, 2
je 0x4030ea
or esi, 0x8000
mov dword [0x40b8b4], esi
shl eax, 8
add eax, edx
mov dword [0x40b8b8], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x403125
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x403125
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40313d
cmp eax, 0x20b
je 0x40312a
mov dword [ebp - 0x1c], esi
jmp 0x403151
cmp dword [ecx + 0x84], 0xe
jbe 0x403125
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40314b
cmp dword [ecx + 0x74], 0xe
jbe 0x403125
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.004051fb
pop ecx
test eax, eax
jne 0x40317d
cmp dword [0x40b89c], 1
jne 0x40316a
call fcn.004049b0
push 0x1c
call fcn.00404839
push 0xff
call fcn.00403c4f
pop ecx
pop ecx
call fcn.00405159
mov dword [ebp - 4], esi
call fcn.00404fae
test eax, eax
jge 0x403196
push 0x1b
call fcn.00403065
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ce74], eax
call fcn.00404e8c
mov dword [0x40b894], eax
call fcn.00404dea
test eax, eax
jge 0x4031bc
push 8
call fcn.00403065
pop ecx
call fcn.00404bb7
test eax, eax
jge 0x4031cd
push 9
call fcn.00403065
pop ecx
push 1
call fcn.00403c7f
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4031e3
push eax
call fcn.00403065
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00404b5a
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x403204
movzx eax, word [ebp - 0x40]
jmp 0x403207
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401960
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x403225
push edi
call fcn.00403daa
call fcn.00403dcc
jmp 0x403257
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00405287
ret
Function at 0x403ce9
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40b8f0], esi
push edi
jne 0x403d09
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x40b8ec], esi
mov byte [0x40b8e8], al
jne 0x403d6f
mov ecx, dword [0x40ce68]
test ecx, ecx
je 0x403d50
mov eax, dword [0x40ce64]
sub eax, 4
cmp eax, ecx
jmp 0x403d49
mov eax, dword [eax]
test eax, eax
je 0x403d3b
call eax
mov eax, dword [0x40ce64]
sub eax, 4
cmp eax, dword [0x40ce68]
mov dword [0x40ce64], eax
jae 0x403d33
mov eax, 0x40b024
mov esi, 0x40b02c
cmp eax, esi
mov edi, eax
jae 0x403d6f
mov eax, dword [edi]
test eax, eax
je 0x403d68
call eax
add edi, 4
cmp edi, esi
jb 0x403d60
mov eax, 0x40b030
mov esi, 0x40b038
cmp eax, esi
mov edi, eax
jae 0x403d8e
mov eax, dword [edi]
test eax, eax
je 0x403d87
call eax
add edi, 4
cmp edi, esi
jb 0x403d7f
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x403da8
push dword [ebp + 8]
mov dword [0x40b8f0], 1
call fcn.00403c4f
pop ebp
ret

Function at 0x404839
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40b11c]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x40b298]
je 0x40486e
inc eax
cmp eax, 0x13
jb 0x40485f
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40b298]
jne 0x404994
mov eax, dword [0x40b89c]
cmp eax, 1
je 0x40496c
cmp eax, edx
jne 0x40489e
cmp dword [0x40b0f8], 1
je 0x40496c
cmp ecx, 0xfc
je 0x404994
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4048d4
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00405fa0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00403310
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x404908
mov eax, edi
push eax
call fcn.00403310
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x409820
push edi
call fcn.00402990
add esp, 0x10
push edi
call fcn.00403310
push dword [esi + 0x40b29c]
mov ebx, eax
call fcn.00403310
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004053b0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00405fa0
push edi
push ebx
call fcn.00405fb0
push 0x409800
push ebx
call fcn.00405fb0
push dword [esi + 0x40b29c]
push ebx
call fcn.00405fb0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00406a35
add esp, 0x2c
jmp 0x404994
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40b29c]
push dword [esi]
call fcn.00403310
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.00406b5f
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4063fc
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40cd48]
mov eax, dword [0x40b11c]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x4065c2
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40cd60]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x4065c2
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x406466
xor eax, eax
jmp 0x4065d6
test al, 0x20
je 0x406477
push 2
push edi
push edi
push ecx
call fcn.004071c2
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40654c
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x406593
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x4064d9
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4064ca
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x4064ac
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406519
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x406525
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x4064a0
jmp 0x406527
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x4065bd
cmp dword [ebp + 0x3a4], edi
je 0x406593
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x406585
mov dword [0x40b8a8], eax
jmp 0x4065c9
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406577
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x406527
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x406527
push dword [ebp + 0x3a4]
call fcn.004047da
pop ecx
jmp 0x4065d3
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4065ab
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40645f
mov dword [0x40b8a4], 0x1c
mov dword [0x40b8a8], edi
jmp 0x4065d3
sub eax, dword [ebp - 0x7c]
jmp 0x4065d6
and dword [0x40b8a8], 0
mov dword [0x40b8a4], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00406b5f
add ebp, 0x39c
leave
ret
Function at 0x406a35
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40ba30], ebx
push esi
push edi
jne 0x406ab5
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x406af0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4098b4
push edi
call esi
test eax, eax
mov dword [0x40ba30], eax
je 0x406af0
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40ba34], eax
call esi
cmp dword [0x40b8b0], 2
mov dword [0x40ba38], eax
jne 0x406ab5
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40ba40], eax
je 0x406ab5
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40ba3c], eax
mov eax, dword [0x40ba3c]
test eax, eax
je 0x406afa
call eax
test eax, eax
je 0x406ae1
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40ba40]
test eax, eax
je 0x406ae1
test byte [ebp - 8], 1
jne 0x406afa
cmp dword [0x40b8bc], 4
jb 0x406af4
or byte [ebp + 0x12], 0x20
jmp 0x406b19
xor eax, eax
jmp 0x406b29
or byte [ebp + 0x12], 4
jmp 0x406b19
mov eax, dword [0x40ba34]
test eax, eax
je 0x406b19
call eax
mov ebx, eax
test ebx, ebx
je 0x406b19
mov eax, dword [0x40ba38]
test eax, eax
je 0x406b19
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40ba30]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406f99
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x406fc7
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x406fce
cmp ebx, dword [eax + 4]
jae 0x406fce
xor eax, eax
jmp 0x4071be
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x406fdf
xor eax, eax
inc eax
jmp 0x4071bd
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x406ff5
cmp ecx, edx
jae 0x40713a
cmp dword [eax + 4], 0
je 0x406ffe
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x406fe6
cmp dword [ebp + 8], 0
je 0x407020
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40713a
cmp eax, esi
jae 0x40713a
mov eax, dword [0x40ba48]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x407045
cmp dword [esi*4 + 0x40ba50], edi
je 0x40713e
inc esi
cmp esi, eax
jl 0x407033
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4071ba
cmp dword [ebp - 8], 0x1000000
jne 0x4071ba
test byte [ebp - 0xc], 0xcc
je 0x4070c3
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4071ba
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4071ba
cmp word [eax + 0x18], 0x10b
jne 0x4071ba
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4071ba
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4070c3
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4070c3
test byte [ecx + 0x27], 0x80
jne 0x40713a
push 1
push 0x40ba90
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x406fd7
mov ecx, dword [0x40ba48]
test ecx, ecx
mov edx, ecx
jle 0x4070f7
lea eax, [ecx*4 + 0x40ba4c]
cmp dword [eax], edi
je 0x4070f7
dec edx
sub eax, 4
test edx, edx
jg 0x4070eb
test edx, edx
jne 0x407128
push 0xf
pop ebx
cmp ecx, ebx
jg 0x407104
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40711c
lea eax, [edx*4 + 0x40ba50]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x40710a
cmp ecx, 0x10
jge 0x407128
inc ecx
mov dword [0x40ba48], ecx
push 0
push 0x40ba90
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x406fd7
xor eax, eax
jmp 0x4071bd
test esi, esi
jle 0x406fd7
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x40ba90
call ebx
test eax, eax
jne 0x406fd7
cmp dword [esi*4 + 0x40ba50], edi
je 0x407194
mov eax, dword [0x40ba48]
lea esi, [eax - 1]
test esi, esi
jl 0x407182
cmp dword [esi*4 + 0x40ba50], edi
je 0x40717e
dec esi
jns 0x407172
test esi, esi
jge 0x407192
cmp eax, 0x10
jge 0x40718d
inc eax
mov dword [0x40ba48], eax
lea esi, [eax - 1]
jmp 0x407194
je 0x4071ac
xor ecx, ecx
test esi, esi
jl 0x4071ac
lea eax, [ecx*4 + 0x40ba50]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x40719a
push 0
push 0x40ba90
call ebx
jmp 0x406fd7
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407334
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.004053b0
mov eax, dword [0x40b11c]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x40cd48]
mov dword [ebp - 4], eax
jae 0x407477
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x40cd60]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x407477
push 1
push esi
push ebx
call fcn.0040767e
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x407481
push 2
push esi
push ebx
call fcn.0040767e
add esp, 0xc
cmp eax, 0xffffffff
je 0x407481
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x407421
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.00407f90
push 0x8000
push ebx
call fcn.00407ff0
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x4073e0
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.004063fc
add esp, 0xc
cmp eax, 0xffffffff
je 0x4073fe
sub edi, eax
test edi, edi
jg 0x4073d5
jmp 0x407414
cmp dword [0x40b8a8], 5
jne 0x407411
mov dword [0x40b8a4], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.00407ff0
pop ecx
pop ecx
jmp 0x407461
jge 0x407461
push 0
push dword [ebp + 0xc]
push ebx
call fcn.0040767e
push ebx
call fcn.004063c0
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, 0xffffffff
jne 0x407461
mov dword [0x40b8a4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40b8a8], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.0040767e
add esp, 0xc
mov eax, esi
pop edi
jmp 0x407484
mov dword [0x40b8a4], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00406b5f
leave
ret
Function at 0x407490
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x40cd48]
push edi
jae 0x407665
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x40cd60]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x407665
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40753b
test dl, 2
jne 0x40753b
test dl, 0x48
je 0x407505
cmp byte [eax + 5], 0xa
je 0x407505
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40754e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x407536
mov dword [0x40b8a8], ecx
jmp 0x40766c
cmp eax, 0x6d
jne 0x407542
xor eax, eax
jmp 0x407679
push eax
call fcn.004047da
pop ecx
jmp 0x407676
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x407660
test eax, eax
je 0x407575
cmp byte [ebx], 0xa
jne 0x407575
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40757e
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40765a
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40764a
cmp al, 0xd
je 0x4075b0
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40763c
dec ecx
cmp dword [ebp - 8], ecx
jae 0x4075ca
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x4075c5
add dword [ebp - 8], 2
jmp 0x40761e
mov dword [ebp - 8], eax
jmp 0x407638
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4075f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x407638
cmp dword [ebp - 0x10], 0
je 0x407638
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x407613
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40761e
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40763b
cmp ebx, dword [ebp + 0xc]
jne 0x407623
cmp byte [ebp - 1], 0xa
jne 0x407623
mov byte [ebx], 0xa
jmp 0x40763b
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0040767e
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40763c
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x407594
jmp 0x40765a
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40765a
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x407679
and dword [0x40b8a8], 0
mov dword [0x40b8a4], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret