joyce8/EMBER2024-capa huggingface dataset:
Function at 0x423360
Capabilities:
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x9c
xor eax, eax
push ebx
mov dword [esp + 8], eax
push esi
mov dword [esp + 0x10], eax
push edi
mov dword [esp + 0x18], eax
mov ecx, 6
mov dword [esp + 0x1c], eax
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov ecx, 9
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
mov ecx, 0x12
lea edi, [esp + 0x60]
rep stosd dword es:[edi], eax
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0xc], eax
call fcn.00424080
lea ecx, [esp + 0x24]
mov edi, eax
push ecx
call fcn.004240a0
lea edx, [esp + 0xc]
push edx
push 0x18
push eax
push ebx
push edi
call fcn.00424090
cmp eax, 0xc0000004
jne 0x423425
mov eax, dword [esp + 0xc]
imul eax, eax, 2
jo 0x4234d5
test esi, esi
mov dword [esp + 0xc], eax
je 0x4233f2
call fcn.00424070
push esi
push 1
push eax
call fcn.00424060
call fcn.00424070
mov ecx, dword [esp + 0xc]
push ecx
push 1
push eax
call fcn.00424050
mov esi, eax
call fcn.00424080
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0xc]
push edx
push ecx
push esi
push 0
push eax
call fcn.00424090
cmp eax, 0xc0000004
je 0x4233cf
test eax, eax
je 0x42342e
mov ebx, 6
test esi, esi
je 0x423445
lea edx, [esp + 0x24]
push edx
call fcn.004240a0
push 0x18
push esi
push eax
call fcn.00424000
lea eax, [esp + 0x10]
push eax
call fcn.004240a0
push 0x14
mov ecx, dword [esp + 0x2c]
push ecx
push eax
call fcn.00424000
lea edx, [esp + 0x10]
mov esi, dword [esp + 0xac]
push edx
mov dword [esp + 0x1c], esi
call fcn.004240a0
push 0x14
push eax
mov eax, dword [esp + 0x30]
push eax
call fcn.00424000
lea ecx, [esp + 0x3c]
push ecx
call fcn.004240a0
push 0x24
mov edx, dword [esp + 0x20]
push edx
push eax
call fcn.00424000
lea eax, [esp + 0x60]
push eax
call fcn.004240a0
push 0x48
mov ecx, dword [esp + 0x4c]
push ecx
push eax
call fcn.00424000
lea edx, [esp + 0x60]
mov dword [esp + 0x78], esi
push edx
call fcn.004240a0
push 0x48
push eax
mov eax, dword [esp + 0x50]
push eax
call fcn.00424000
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x9c
ret 4
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop
nop
nop
Function at 0x4234e0
Capabilities:
Inspect section memory permissions

Disassembly:
sub esp, 0x124
push ebx
push ebp
push esi
push edi
mov ecx, 0x3e
xor eax, eax
lea edi, [esp + 0x3c]
xor ebx, ebx
rep stosd dword es:[edi], eax
mov ecx, 0xa
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x138]
lea eax, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x18], ebx
xor esi, esi
call fcn.00423e30
cmp eax, ebx
jne 0x423532
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x124
ret 4
movsx edx, word [esp + 0x50]
add eax, 4
jo 0x423647
add eax, 0x14
jo 0x423647
add eax, edx
jo 0x423647
mov edi, eax
mov ax, word [esp + 0x42]
sub ax, 1
jo 0x423647
movsx ebp, ax
cmp ebp, ebx
jl 0x423638
lea ecx, [esp + 0x14]
push ecx
call fcn.004240a0
push 0x28
push edi
push eax
call fcn.00424000
mov eax, dword [esp + 0x38]
test eax, 0x20000000
je 0x4235b4
test eax, 0x40000000
je 0x4235a3
and eax, 0x80000000
neg eax
sbb eax, eax
and eax, 0x20
add eax, 0x20
jmp 0x4235d9
and eax, 0x80000000
neg eax
sbb eax, eax
and eax, 0x70
add eax, 0x10
jmp 0x4235d9
test eax, 0x40000000
je 0x4235cc
and eax, 0x80000000
neg eax
sbb eax, eax
and eax, 2
add eax, 2
jmp 0x4235d9
and eax, 0x80000000
neg eax
sbb eax, eax
and eax, 7
inc eax
lea edx, [esp + 0x10]
mov esi, eax
push edx
call fcn.004240a0
push eax
push esi
mov ecx, dword [esp + 0x28]
mov esi, dword [esp + 0x140]
mov eax, dword [esp + 0x24]
add ecx, esi
push eax
jo 0x423647
push ecx
call fcn.00423fe0
test eax, eax
je 0x423626
add edi, 0x28
jo 0x423647
add ebx, 1
jo 0x423647
cmp ebx, ebp
jle 0x42356d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x124
ret 4
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x124
ret 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret 4
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop

Function at 0x423e30
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x138
mov ecx, 0x3e
xor eax, eax
push ebx
push esi
push edi
lea edi, [esp + 0x4c]
rep stosd dword es:[edi], eax
mov ecx, 0x10
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
xor ebx, ebx
push eax
call fcn.004240a0
push 0x40
mov esi, dword [esp + 0x14c]
push esi
push eax
call fcn.00424000
mov ecx, dword [esp + 0xc]
and ecx, 0xffff
cmp ecx, 0x5a4d
jne 0x423ef2
mov eax, dword [esp + 0x48]
test al, 3
jne 0x423ef2
add eax, esi
lea edx, [esp + 0x4c]
jo 0x423f00
push edx
mov esi, eax
call fcn.004240a0
push 0xf8
push esi
push eax
call fcn.00424000
cmp word [esp + 0x64], 0x10b
jne 0x423ef2
cmp dword [esp + 0x4c], 0x4550
jne 0x423ef2
cmp word [esp + 0x60], 0xe0
jne 0x423ef2
mov eax, dword [esp + 0x14c]
push eax
call fcn.004240a0
lea ecx, [esp + 0x4c]
mov edi, eax
push ecx
call fcn.004240a0
push 0xf8
push eax
push edi
call fcn.00424000
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x138
ret 8
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x138
ret 8
call dword [sym.imp.MSVBVM60.DLL___vbaErrorOverflow]
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x401000
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0x104
mov eax, dword [0x40e0d4]
mov dword [esp + 0x100], eax
mov eax, dword [0x40e7c0]
test eax, eax
jne 0x401079
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [esp + 4]
push str.gPakInterfaceP__d
push eax
call fcn.00403ced
add esp, 0xc
lea ecx, [esp]
push ecx
push 4
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
push 4
push 0
push 0
push 0xf001f
push eax
mov dword [0x40e7c0], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x40e7c4], eax
mov eax, dword [eax]
mov ecx, dword [esp + 0x100]
call fcn.00403d76
add esp, 0x104
ret
mov edx, dword [0x40e7c4]
mov ecx, dword [esp + 0x100]
mov eax, dword [edx]
call fcn.00403d76
add esp, 0x104
ret
Function at 0x403b30
Capabilities:
Create directory

Disassembly:
sub esp, 0x104
mov eax, dword [0x40e0d4]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push esi
mov esi, dword [esp + 0x110]
mov dword [esp + 0x108], eax
cmp byte [esi], 0
je 0x403b8b
push edi
lea edi, [esp + 0xc]
sub edi, esi
lea ecx, [ecx]
mov al, byte [esi]
cmp al, 0x5c
je 0x403b6a
cmp al, 0x2f
jne 0x403b79
cmp byte [esi - 1], 0x3a
je 0x403b79
push 0
lea eax, [esp + 0x10]
push eax
call ebp
mov cl, byte [esi]
mov al, byte [esi + 1]
mov byte [edi + esi], cl
inc esi
test al, al
mov byte [edi + esi], 0
jne 0x403b60
pop edi
push 0
lea edx, [esp + 0xc]
push edx
call ebp
mov ecx, dword [esp + 0x108]
pop esi
pop ebp
call fcn.00403d76
add esp, 0x104
ret

Function at 0x40654f
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40e84c], esi
push edi
jne 0x40656f
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 [0x40e848], esi
mov byte [0x40e844], al
jne 0x4065d5
mov ecx, dword [0x40fdd0]
test ecx, ecx
je 0x4065b6
mov eax, dword [0x40fdcc]
sub eax, 4
cmp eax, ecx
jmp 0x4065af
mov eax, dword [eax]
test eax, eax
je 0x4065a1
call eax
mov eax, dword [0x40fdcc]
sub eax, 4
cmp eax, dword [0x40fdd0]
mov dword [0x40fdcc], eax
jae 0x406599
mov eax, 0x40e028
mov esi, 0x40e030
cmp eax, esi
mov edi, eax
jae 0x4065d5
mov eax, dword [edi]
test eax, eax
je 0x4065ce
call eax
add edi, 4
cmp edi, esi
jb 0x4065c6
mov eax, 0x40e034
mov esi, 0x40e03c
cmp eax, esi
mov edi, eax
jae 0x4065f4
mov eax, dword [edi]
test eax, eax
je 0x4065ed
call eax
add edi, 4
cmp edi, esi
jb 0x4065e5
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40660e
push dword [ebp + 8]
mov dword [0x40e84c], 1
call fcn.004064b5
pop ebp
ret
Function at 0x40698c
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 [0x40ec60]
push edi
jae 0x406b61
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x40ec80]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x406b61
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x406a37
test dl, 2
jne 0x406a37
test dl, 0x48
je 0x406a01
cmp byte [eax + 5], 0xa
je 0x406a01
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 0x406a4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x406a32
mov dword [0x40e804], ecx
jmp 0x406b68
cmp eax, 0x6d
jne 0x406a3e
xor eax, eax
jmp 0x406b75
push eax
call fcn.00409dad
pop ecx
jmp 0x406b72
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x406b5c
test eax, eax
je 0x406a71
cmp byte [ebx], 0xa
jne 0x406a71
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x406a7a
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 0x406b56
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x406b46
cmp al, 0xd
je 0x406aac
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x406b38
dec ecx
cmp dword [ebp - 8], ecx
jae 0x406ac6
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x406ac1
add dword [ebp - 8], 2
jmp 0x406b1a
mov dword [ebp - 8], eax
jmp 0x406b34
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 0x406aee
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x406b34
cmp dword [ebp - 0x10], 0
je 0x406b34
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x406b0f
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x406b1a
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x406b37
cmp ebx, dword [ebp + 0xc]
jne 0x406b1f
cmp byte [ebp - 1], 0xa
jne 0x406b1f
mov byte [ebx], 0xa
jmp 0x406b37
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00408830
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x406b38
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x406a90
jmp 0x406b56
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x406b56
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 0x406b75
and dword [0x40e804], 0
mov dword [0x40e800], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408088
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40ec60]
mov eax, dword [0x40e0d4]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40824e
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40ec80]
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 0x40824e
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x4080f2
xor eax, eax
jmp 0x408262
test al, 0x20
je 0x408103
push 2
push edi
push edi
push ecx
call fcn.0040a095
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4081d8
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x40821f
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x408165
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x408156
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 0x408138
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 0x4081a5
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x4081b1
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40812c
jmp 0x4081b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x408249
cmp dword [ebp + 0x3a4], edi
je 0x40821f
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x408211
mov dword [0x40e804], eax
jmp 0x408255
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 0x408203
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x4081b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x4081b3
push dword [ebp + 0x3a4]
call fcn.00409dad
pop ecx
jmp 0x40825f
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x408237
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x4080eb
mov dword [0x40e800], 0x1c
mov dword [0x40e804], edi
jmp 0x40825f
sub eax, dword [ebp - 0x7c]
jmp 0x408262
and dword [0x40e804], 0
mov dword [0x40e800], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.00403d76
add ebp, 0x39c
leave
ret
Function at 0x408c38
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x40e0d4]
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 + 0x40e400]
je 0x408c6d
inc eax
cmp eax, 0x13
jb 0x408c5e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x40e400]
jne 0x408d93
mov eax, dword [0x40e7f4]
cmp eax, 1
je 0x408d6b
cmp eax, edx
jne 0x408c9d
cmp dword [0x40e124], 1
je 0x408d6b
cmp ecx, 0xfc
je 0x408d93
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 0x408cd3
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00408ab0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00405200
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x408d07
mov eax, edi
push eax
call fcn.00405200
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40c3bc
push edi
call fcn.00409790
add esp, 0x10
push edi
call fcn.00405200
push dword [esi + 0x40e404]
mov ebx, eax
call fcn.00405200
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.004048d0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00408ab0
push edi
push ebx
call fcn.00408ac0
push 0x40c3b8
push ebx
call fcn.00408ac0
push dword [esi + 0x40e404]
push ebx
call fcn.00408ac0
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00409695
add esp, 0x2c
jmp 0x408d93
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x40e404]
push dword [esi]
call fcn.00405200
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.00403d76
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x409695
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40e9b0], ebx
push esi
push edi
jne 0x409715
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x409750
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x40e9b0], eax
je 0x409750
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40e9b4], eax
call esi
cmp dword [0x40e80c], 2
mov dword [0x40e9b8], eax
jne 0x409715
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40e9c0], eax
je 0x409715
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40e9bc], eax
mov eax, dword [0x40e9bc]
test eax, eax
je 0x40975a
call eax
test eax, eax
je 0x409741
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40e9c0]
test eax, eax
je 0x409741
test byte [ebp - 8], 1
jne 0x40975a
cmp dword [0x40e818], 4
jb 0x409754
or byte [ebp + 0x12], 0x20
jmp 0x409779
xor eax, eax
jmp 0x409789
or byte [ebp + 0x12], 4
jmp 0x409779
mov eax, dword [0x40e9b4]
test eax, eax
je 0x409779
call eax
mov ebx, eax
test ebx, ebx
je 0x409779
mov eax, dword [0x40e9b8]
test eax, eax
je 0x409779
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40e9b0]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4098b4
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 0x4098e2
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 0x4098e9
cmp ebx, dword [eax + 4]
jae 0x4098e9
xor eax, eax
jmp 0x409ad9
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4098fa
xor eax, eax
inc eax
jmp 0x409ad8
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x409910
cmp ecx, edx
jae 0x409a55
cmp dword [eax + 4], 0
je 0x409919
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x409901
cmp dword [ebp + 8], 0
je 0x40993b
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x409a55
cmp eax, esi
jae 0x409a55
mov eax, dword [0x40e9c8]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x409960
cmp dword [esi*4 + 0x40e9d0], edi
je 0x409a59
inc esi
cmp esi, eax
jl 0x40994e
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x409ad5
cmp dword [ebp - 8], 0x1000000
jne 0x409ad5
test byte [ebp - 0xc], 0xcc
je 0x4099de
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x409ad5
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x409ad5
cmp word [eax + 0x18], 0x10b
jne 0x409ad5
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x409ad5
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4099de
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4099de
test byte [ecx + 0x27], 0x80
jne 0x409a55
push 1
push 0x40ea10
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x4098f2
mov ecx, dword [0x40e9c8]
test ecx, ecx
mov edx, ecx
jle 0x409a12
lea eax, [ecx*4 + 0x40e9cc]
cmp dword [eax], edi
je 0x409a12
dec edx
sub eax, 4
test edx, edx
jg 0x409a06
test edx, edx
jne 0x409a43
push 0xf
pop ebx
cmp ecx, ebx
jg 0x409a1f
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x409a37
lea eax, [edx*4 + 0x40e9d0]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x409a25
cmp ecx, 0x10
jge 0x409a43
inc ecx
mov dword [0x40e9c8], ecx
push 0
push 0x40ea10
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x4098f2
xor eax, eax
jmp 0x409ad8
test esi, esi
jle 0x4098f2
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x40ea10
call ebx
test eax, eax
jne 0x4098f2
cmp dword [esi*4 + 0x40e9d0], edi
je 0x409aaf
mov eax, dword [0x40e9c8]
lea esi, [eax - 1]
test esi, esi
jl 0x409a9d
cmp dword [esi*4 + 0x40e9d0], edi
je 0x409a99
dec esi
jns 0x409a8d
test esi, esi
jge 0x409aad
cmp eax, 0x10
jge 0x409aa8
inc eax
mov dword [0x40e9c8], eax
lea esi, [eax - 1]
jmp 0x409aaf
je 0x409ac7
xor ecx, ecx
test esi, esi
jl 0x409ac7
lea eax, [ecx*4 + 0x40e9d0]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x409ab5
push 0
push 0x40ea10
call ebx
jmp 0x4098f2
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a47c
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.004048d0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a517
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x40e80c]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40a517
cmp eax, 1
je 0x40a538
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a517
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40a4e4
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40a513
xor eax, eax
inc eax
jmp 0x40a557
cmp edi, eax
jae 0x40a51b
xor eax, eax
jmp 0x40a557
cmp eax, esi
jae 0x40a522
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x40e80c]
jmp 0x40a53b
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40ab0a
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1008
call fcn.004048d0
mov eax, dword [0x40e0d4]
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
cmp ebx, dword [0x40ec60]
mov dword [ebp - 4], eax
jae 0x40ac4d
mov eax, ebx
sar eax, 5
mov eax, dword [eax*4 + 0x40ec80]
mov ecx, ebx
and ecx, 0x1f
test byte [eax + ecx*8 + 4], 1
je 0x40ac4d
push 1
push esi
push ebx
call fcn.00408830
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x1008], eax
je 0x40ac57
push 2
push esi
push ebx
call fcn.00408830
add esp, 0xc
cmp eax, 0xffffffff
je 0x40ac57
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x40abf7
push 0x1000
lea eax, [ebp - 0x1004]
push esi
push eax
call fcn.0040a210
push 0x8000
push ebx
call fcn.0040ae20
add esp, 0x14
mov dword [ebp + 8], eax
mov eax, 0x1000
cmp edi, eax
jge 0x40abb6
mov eax, edi
push eax
lea eax, [ebp - 0x1004]
push eax
push ebx
call fcn.00408088
add esp, 0xc
cmp eax, 0xffffffff
je 0x40abd4
sub edi, eax
test edi, edi
jg 0x40abab
jmp 0x40abea
cmp dword [0x40e804], 5
jne 0x40abe7
mov dword [0x40e800], 0xd
or esi, 0xffffffff
push dword [ebp + 8]
push ebx
call fcn.0040ae20
pop ecx
pop ecx
jmp 0x40ac37
jge 0x40ac37
push 0
push dword [ebp + 0xc]
push ebx
call fcn.00408830
push ebx
call fcn.00409f9a
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 0x40ac37
mov dword [0x40e800], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x40e804], eax
push 0
push dword [ebp - 0x1008]
push ebx
call fcn.00408830
add esp, 0xc
mov eax, esi
pop edi
jmp 0x40ac5a
mov dword [0x40e800], 9
or eax, 0xffffffff
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.00403d76
leave
ret

Function at 0x40b012
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
test eax, eax
je 0x40b040
add al, 0x40
mov byte [ebp + 8], al
lea eax, [ebp + 8]
push eax
mov byte [ebp + 9], 0x3a
mov byte [ebp + 0xa], 0x5c
mov byte [ebp + 0xb], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
test eax, eax
je 0x40b045
cmp eax, 1
je 0x40b045
xor eax, eax
inc eax
pop ebp
ret
xor eax, eax
pop ebp
ret