joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407b2c
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x38]
lea edi, [ebp - 0x2c]
push ebx
sub esp, 0x3c
mov esi, dword [ebp + 8]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x2c], 0x40001
mov dword [ebp - 0x28], 0x40c890
mov dword [ebp - 0x24], 0x40c890
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0x40c880
mov dword [ebp - 0x38], 0xc
mov dword [ebp - 0x30], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edx
push edx
test eax, eax
je 0x407b89
xor eax, eax
jmp 0x407bb6
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0xb7
jne 0x407bb6
mov dword [esp + 8], edi
mov dword [esp + 4], 0x80000007
mov dword [esp], esi
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
sub esp, 0xc
test eax, eax
jne 0x407b85
call ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4

Function at 0x407bee
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [0x440500], 0x44
lea eax, [ebp - 0x18]
mov dword [esp + 0x20], 0x440500
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000000
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edx, eax
sub esp, 0x28
xor eax, eax
test edx, edx
je 0x407c6c
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov eax, dword [ebp - 0x18]
leave
ret 4

Function at 0x407c70
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov dword [eax], 0x3c
mov dword [eax + 0x24], 0
pop ebp
jmp dword [sym.imp.SHELL32.dll_ShellExecuteExW]

Function at 0x407ee8
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebx, eax
inc eax
push edx
je 0x407f16
mov eax, ebx
mov dword [esp], esi
and eax, 0xfffffffe
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push eax
push eax
lea esp, [ebp - 8]
mov eax, ebx
pop ebx
pop esi
pop ebp
ret 4

Function at 0x407f21
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [esp], ebx
call fcn.00407ee8
push ecx
cmp eax, 0xffffffff
jne 0x407f42
xor edi, edi
jmp 0x407f7f
mov dword [esp], ebx
mov esi, eax
test edi, 1
je 0x407f77
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push edx
test eax, eax
jne 0x407f70
and edi, 4
jne 0x407f3e
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push eax
push eax
jmp 0x407f7f
mov edi, 1
jmp 0x407f7f
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x407f55
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret 8
Function at 0x40894e
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov dword [0x43ed00], 0x55004e
mov dword [0x43ed04], 0x4c
test esi, esi
jne 0x4089a7
mov eax, dword [ebp + 8]
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x43e500
mov dword [esp], eax
call ebx
sub esp, 0xc
test eax, eax
je 0x408b9b
cmp eax, 0x400
jle 0x4089f8
jmp 0x408b9b
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.00407f8b
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x43ed00
mov dword [esp], esi
call ebx
sub esp, 0xc
test eax, eax
je 0x408b9b
cmp eax, 0x400
jle 0x408978
jmp 0x408b9b
mov dword [esp + 0xc], 0x43e500
mov dword [esp + 8], 0x43ed00
mov dword [esp + 4], str._ls_ls_r_n
mov dword [esp], 0x43e100
call dword [sym.imp.USER32.dll_wsprintfA]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x419930]
mov eax, dword [eax + 0x128]
mov dword [esp], 0x43e500
mov dword [esp + 4], eax
call fcn.00408641
push edi
push edi
mov dword [esp + 8], 4
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x43e500
call fcn.00407f8b
sub esp, 0xc
mov edi, eax
cmp eax, 0xffffffff
je 0x408b9b
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov eax, dword [ebp - 0x1c]
push ecx
push ecx
add eax, ebx
mov dword [ebp - 0x24], eax
add eax, 0xa
mov dword [esp + 4], eax
mov dword [esp], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push esi
push esi
mov esi, eax
test eax, eax
je 0x408b91
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00408051
sub esp, 0xc
test eax, eax
je 0x408b91
mov dword [esp + 4], str._Rename__r_n
mov dword [esp], esi
call fcn.00407e60
push edx
push edx
lea edx, [esi + ebx]
test eax, eax
jne 0x408af2
mov dword [esp + 4], str._Rename__r_n
add ebx, 0xa
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, ebx
push eax
push eax
jmp 0x408b31
add eax, 0xa
mov dword [esp + 4], 0x40c68b
mov dword [esp], eax
mov dword [ebp - 0x28], edx
call fcn.00407e60
mov dword [ebp - 0x20], eax
push ecx
push ecx
mov ecx, ebx
test eax, eax
je 0x408b31
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
add ecx, esi
cmp edx, dword [ebp - 0x20]
jbe 0x408b29
mov al, byte [edx]
dec edx
dec ecx
mov byte [ecx + 1], al
jmp 0x408b1b
mov eax, dword [ebp - 0x20]
sub eax, esi
lea ecx, [eax + 1]
mov eax, dword [ebp - 0x1c]
add ecx, esi
mov dword [esp + 4], 0x43e100
mov dword [esp], ecx
mov dword [esp + 8], eax
call fcn.00407ecb
add ebx, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.00408097
sub esp, 0xc
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push edx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x408c20
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov eax, dword [ebp + 8]
mov dword [esp], 0x43f500
mov dword [esp + 4], eax
call fcn.0040849c
push ebx
push ebx
mov dword [esp], 0x43f500
call fcn.00407dcc
push edx
test eax, eax
jne 0x408c51
xor eax, eax
jmp 0x408ccd
mov dword [esp], eax
mov ebx, eax
call fcn.00408564
push ecx
test byte [0x41992c], 0x80
je 0x408c73
mov ax, word [ebx]
test ax, ax
je 0x408c4d
cmp ax, 0x5c
je 0x408c4d
sub ebx, 0x43f500
sar ebx, 1
mov dword [esp], 0x43f500
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ecx
mov dword [esp], 0x43f500
cmp ebx, eax
jge 0x408cb2
call fcn.00408be8
push edx
test eax, eax
je 0x408ca3
test byte [eax], 0x10
je 0x408c4d
mov dword [esp], 0x43f500
call fcn.00407d5a
push eax
jmp 0x408c7b
call fcn.004084d0
push eax
mov dword [esp], 0x43f500
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
inc eax
push edx
setne al
movzx eax, al
mov ebx, dword [ebp - 4]
leave
ret 4
Function at 0x408f54
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ebx
lea ebx, [ebp - 0x244]
sub esp, 0x254
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push edx
push edx
lea edx, [eax - 1]
cmp edx, 0x103
ja 0x408f92
xor edx, edx
cmp word [ebp + eax*2 - 0x246], 0x5c
sete dl
jmp 0x408f99
xor eax, eax
mov edx, 1
mov ecx, dword [ebp + 8]
add edx, edx
add eax, eax
mov dword [esp + 4], str._s_S.dll
add edx, 0x40c660
add eax, ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
mov dword [esp], eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov dword [esp], ebx
mov dword [esp + 8], 8
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, dword [ebp - 4]
sub esp, 0xc
leave
ret 4

Function at 0x409138
Capabilities:
Hash data with crc32

Disassembly:
push ebp
cmp dword [0x440564], 0
mov ebp, esp
push esi
mov edx, dword [ebp + 0xc]
push ebx
jne 0x409175
xor ecx, ecx
mov eax, ecx
mov ebx, 8
mov esi, eax
shr esi, 1
and eax, 1
je 0x409160
mov eax, 0xedb88320
xor eax, esi
dec ebx
jne 0x409152
mov dword [ecx*4 + 0x440560], eax
inc ecx
cmp ecx, 0x100
jne 0x40914b
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
not eax
add ebx, edx
cmp edx, ebx
je 0x409197
mov cl, byte [edx]
inc edx
xor ecx, eax
shr eax, 8
movzx ecx, cl
xor eax, dword [ecx*4 + 0x440560]
jmp 0x40917f
pop ebx
not eax
pop esi
pop ebp
ret 0xc
Function at 0x401000
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
jmp 0x401012
mov eax, dword [0x40910f]
shl eax, 2
mov dword [0x409113], eax
push edx
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov edx, eax
call fcn.0040217c
pop edx
call fcn.00401518
call fcn.00402180
push 0
call fcn.00402d98
pop ecx
push 0x4090b8
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [0x409117], eax
push 0
jmp fcn.00406afc

Function at 0x401e70
Capabilities:
Get memory capacity

Disassembly:
add esp, 0xffffffe0
mov dword [esp], 0x20
push esp
call sub.KERNEL32.DLL_GlobalMemoryStatus
mov eax, dword [esp + 0xc]
add esp, 0x20
ret

Function at 0x405b80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
test eax, eax
je 0x405be2
call fcn.00405b30
mov esi, eax
lea eax, [ebp - 4]
push 0
push eax
push esi
call fcn.00402298
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push edi
call fcn.00402298
pop ecx
push eax
push edi
push ebx
call sub.KERNEL32.DLL_WriteFile
push ebx
call sub.KERNEL32.DLL_CloseHandle
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

Function at 0x405c40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff7c
cmp dword [0x40b04c], 0
push ebx
push esi
mov esi, dword [ebp + 8]
jne 0x405d1a
cmp dword [0x40b048], 0
jne 0x405d1a
cmp dword [0x40b23c], 0
je 0x405cd4
push 0x80
lea eax, [ebp - 0x84]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
lea edx, [ebp - 0x84]
push edx
call fcn.00405a30
add esp, 8
mov ebx, eax
test eax, eax
jne 0x405cba
push 0x3a
lea edx, [ebp - 0x84]
push edx
call fcn.00405a30
add esp, 8
mov ebx, eax
test eax, eax
jne 0x405cba
lea ebx, [ebp - 0x84]
jmp 0x405cbb
inc ebx
call fcn.00405bfc
or eax, 0x10010
push eax
push ebx
push esi
push 0
call sub.USER32.DLL_MessageBoxA
jmp 0x405d55
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push 2
push 0x40b050
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push esi
call fcn.00402298
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x40b053
push ebx
call sub.KERNEL32.DLL_WriteFile
jmp 0x405d55
cmp dword [0x40b048], 0
je 0x405d34
cmp dword [0x40b048], 0xffffffff
je 0x405d55
push esi
call dword [0x40b048]
pop ecx
mov eax, dword [0x40b04c]
test eax, eax
je 0x405d55
cmp dword [0x40b04c], 0xffffffff
je 0x405d55
cmp byte [eax], 0
je 0x405d55
push esi
push eax
call fcn.00405b80
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4014f0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
mov dword [ebp - 8], edx
xorps xmm0, xmm0
movups xmmword [esi], xmm0
movq qword [esi + 0x10], xmm0
mov dword [esi + 0x18], 0
mov eax, dword [0x49f5b4]
test eax, eax
je 0x401524
cmp dword [eax + 0x1fc], 0
jne 0x4016c1
push ebx
mov ebx, dword [sym.imp.USER32.dll_PeekMessageW]
push 0
push 0
push 0
push 0
push esi
mov dword [0x49f410], 0
call ebx
test eax, eax
je 0x4016a2
push edi
mov edi, dword [sym.imp.USER32.dll_IsDialogMessageW]
nop
push 0
push 0
push 0
push esi
call dword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x40165a
mov ecx, dword [0x49f534]
xor ebx, ebx
test ecx, ecx
je 0x4015a3
mov eax, dword [ecx + 4]
mov dword [ebp - 4], eax
test eax, eax
je 0x4015a3
nop dword [eax + eax]
lea eax, [ebp - 4]
push eax
call dword [sym.imp.MMFS2.dll_Ordinal_536]
push esi
push eax
call edi
test eax, eax
jne 0x401654
cmp dword [ebp - 4], ebx
je 0x4015a3
mov ecx, dword [0x49f534]
jmp 0x401580
mov eax, dword [0x49f5b4]
test eax, eax
je 0x401646
mov ecx, 0x4000
test word [eax + 0x16], cx
je 0x401646
push dword [0x49f588]
call dword [sym.imp.MMFS2.dll_Ordinal_19]
test eax, eax
je 0x4015e1
push esi
push eax
call dword [sym.imp.USER32.dll_TranslateMDISysAccel]
test eax, eax
mov eax, 1
cmovne ebx, eax
mov eax, dword [esi + 4]
cmp eax, 0x100
je 0x4015f2
cmp eax, 0x104
jne 0x401642
mov edi, dword [esi + 8]
cmp edi, 0x10
je 0x401642
cmp edi, 0x11
je 0x401642
mov ecx, dword [0x49f5b4]
test ecx, ecx
je 0x401642
mov ecx, dword [ecx + 0xb4]
test ecx, ecx
je 0x401642
cmp eax, 0x104
je 0x401629
mov eax, 0x2000
test word [esi + 0xe], ax
jne 0x401629
xor edx, edx
jmp 0x40162e
mov edx, 1
push ecx
mov ecx, dword [0x49f590]
push edi
call fcn.00456200
add esp, 8
test eax, eax
jne 0x401654
test ebx, ebx
jne 0x401654
push esi
call dword [sym.imp.USER32.dll_TranslateMessage]
push esi
call dword [sym.imp.USER32.dll_DispatchMessageW]
mov ebx, dword [sym.imp.USER32.dll_PeekMessageW]
mov eax, dword [ebp - 8]
test eax, eax
je 0x401688
test al, 1
je 0x40166e
cmp dword [esi + 4], 0x111
je 0x4016a1
test al, 2
je 0x40167b
cmp dword [esi + 4], 0x201
je 0x4016a1
test al, 4
je 0x401688
cmp dword [esi + 4], 0x202
je 0x4016a1
push 0
push 0
push 0
push 0
push esi
call ebx
mov edi, dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x401550
pop edi
push 0
call dword [sym.imp.USER32.dll_GetKeyState]
push 0x49f418
push 0
push 0xb
push 0
call dword [sym.imp.MMFS2.dll_Ordinal_31]
mov dword [0x49f410], eax
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x409b80
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
push 2
push 0x104
mov esi, ecx
call fcn.00462e24
mov edi, eax
add esp, 8
test edi, edi
je 0x409bc6
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push dword [ebp + 8]
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push edi
mov esi, eax
call fcn.00462e3a
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
ret
pop edi
xor eax, eax
pop esi
pop ebp
ret
Function at 0x40b080
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, ecx
mov edx, ebx
push esi
lea ecx, [edx + 2]
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40b090
sub edx, ecx
sar edx, 1
push 2
lea eax, [edx + 4]
push eax
call fcn.00462e24
mov esi, eax
add esp, 8
mov dword [ebp - 4], esi
test esi, esi
jne 0x40b0bf
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 2
push 0x104
call fcn.00462e24
mov edi, eax
add esp, 8
test edi, edi
jne 0x40b0e8
push esi
call fcn.00462e3a
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor esi, esi
sub ecx, ebx
nop
movzx eax, word [ebx]
lea ebx, [ebx + 2]
mov word [ecx + ebx - 2], ax
test ax, ax
jne 0x40b0f0
mov ebx, dword [ebp - 4]
push 0x5c
push ebx
call fcn.00460875
add esp, 8
test eax, eax
je 0x40b118
xor ecx, ecx
mov word [eax + 2], cx
cmp word [ebx], 0x5c
jne 0x40b140
cmp word [ebx + 2], 0x5c
jne 0x40b140
lea eax, [ebx + 4]
push 0x5c
push eax
call fcn.00460917
add esp, 8
test eax, eax
je 0x40b1e3
lea ebx, [eax + 2]
jmp 0x40b151
cmp word [ebx + 2], 0x3a
jne 0x40b151
cmp word [ebx + 4], 0x5c
jne 0x40b151
add ebx, 6
push 0x5c
push ebx
call fcn.00460917
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40b1e0
mov ecx, dword [ebp - 4]
mov eax, ebx
sub eax, ecx
sar eax, 1
push eax
push ecx
push edi
call fcn.004643ae
push edi
call fcn.0046457c
add esp, 0x10
test eax, eax
je 0x40b1a7
push edi
call fcn.00464587
add esp, 4
test eax, eax
je 0x40b194
mov esi, 1
jmp 0x40b1a7
push edi
call fcn.0046457c
add esp, 4
test eax, eax
mov eax, 1
cmovne esi, eax
lea eax, [ebx + 2]
mov dword [ebp - 8], ebx
push 0x5c
push eax
call fcn.00460917
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40b1c5
mov ecx, dword [ebp - 8]
test esi, esi
je 0x40b165
mov ebx, dword [ebp - 4]
push edi
call fcn.00462e3a
push ebx
call fcn.00462e3a
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 4]
mov edx, edi
mov ecx, ebx
sub edx, ebx
nop dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x40b1f0
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b205
sub ecx, edx
sar ecx, 1
cmp ecx, 3
jbe 0x40b228
cmp word [edi + ecx*2 - 2], 0x5c
jne 0x40b228
xor eax, eax
mov word [edi + ecx*2 - 2], ax
push edi
call fcn.0046457c
add esp, 4
test eax, eax
je 0x40b1c8
push edi
call fcn.00464587
add esp, 4
test eax, eax
je 0x40b24c
mov esi, 1
jmp 0x40b1c8
push edi
call fcn.0046457c
add esp, 4
mov ecx, 1
test eax, eax
cmovne esi, ecx
jmp 0x40b1c8
Function at 0x40b370
Capabilities:
Enumerate pe sections
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x94
mov eax, dword [0x49d014]
xor eax, esp
mov dword [esp + 0x90], eax
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, ecx
push edi
push 0
push 0
push 0
push ebx
call esi
push 0
lea eax, [esp + 0x24]
push eax
push 0x40
lea eax, [esp + 0x3c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40b3d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.0045f34f
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x20]
cmp eax, 0xffffffff
je 0x40b3bd
cmp eax, 0x40
jne 0x40b3bd
mov eax, 0x5a4d
cmp ax, word [esp + 0x30]
jne 0x40b3bd
push 0
push 0
push dword [esp + 0x74]
push ebx
call esi
push 1
xorps xmm0, xmm0
lea eax, [esp + 0x14]
push eax
movlpd qword [esp + 0x28], xmm0
push dword [esp + 0x2c]
movlpd qword [esp + 0x1c], xmm0
push dword [esp + 0x2c]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40b42c
xorps xmm0, xmm0
movlpd qword [esp + 0x10], xmm0
mov eax, dword [esp + 0x6c]
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cdq
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], ecx
cmp esi, eax
jne 0x40b3bd
cmp ecx, edx
jne 0x40b3bd
push 0xf8
call fcn.0045f360
add esp, 4
mov esi, eax
mov edx, esi
mov dword [esp + 0x20], esi
mov ecx, ebx
push 0xf8
call fcn.0040b290
add esp, 4
test eax, eax
je 0x40b49f
push 0xf8
push esi
call fcn.0045f390
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.0045f34f
mov esp, ebp
pop ebp
ret
movzx eax, word [esi + 6]
mov ecx, ebx
mov edi, dword [esi + 0x54]
mov dword [esp + 0x2c], eax
movzx eax, word [esi + 0x14]
cdq
add eax, dword [esp + 0x18]
adc edx, dword [esp + 0x1c]
add eax, 0x18
adc edx, 0
push edx
push eax
call fcn.0040b330
add esp, 8
mov ecx, ebx
call fcn.0040b2f0
mov ecx, eax
mov dword [esp + 0x10], edx
movzx eax, word [esi + 0x14]
cdq
add eax, dword [esp + 0x18]
adc edx, dword [esp + 0x1c]
add eax, 0x18
adc edx, 0
cmp ecx, eax
jne 0x40b54a
cmp dword [esp + 0x10], edx
jne 0x40b54a
xor esi, esi
cmp dword [esp + 0x2c], esi
jbe 0x40b522
nop dword [eax + eax]
push 0x28
lea edx, [esp + 0x78]
mov ecx, ebx
call fcn.0040b290
add esp, 4
test eax, eax
jne 0x40b522
add edi, dword [esp + 0x84]
inc esi
cmp esi, dword [esp + 0x2c]
jb 0x40b500
push 0xf8
push dword [esp + 0x24]
call fcn.0045f390
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x90]
xor ecx, esp
call fcn.0045f34f
mov esp, ebp
pop ebp
ret
push 0xf8
push esi
call fcn.0045f390
mov ecx, dword [esp + 0xa4]
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045f34f
mov esp, ebp
pop ebp
ret
Function at 0x40da20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov esi, dword [edi + 0xbc]
mov eax, dword [ecx + 0x14]
add esi, edi
mov edx, dword [edi + 0x1c]
mov dword [esi + 8], eax
mov eax, dword [ecx + 0x18]
mov ecx, 1
mov dword [esi + 0xc], eax
mov eax, 0x100
mov dword [esi + 0x10], 1
test word [edi + 0x94], ax
jne 0x40da66
mov dword [esi + 0x10], 0
xor ecx, ecx
mov dword [esi + 0x14], 0
lea eax, [edx + 0x3a]
mov ebx, dword [edi + 0x78]
test bl, 4
je 0x40da7d
test byte [eax], 1
je 0x40daa7
and ebx, 0xfffffffb
mov dword [edi + 0x78], ebx
mov ebx, eax
mov ecx, dword [esi + 0x10]
or ecx, 0x200
mov dword [esi + 0x10], ecx
test byte [ebx], 2
je 0x40daa7
mov eax, dword [edx + 0x46]
or ecx, 0x400
mov dword [esi + 0x14], eax
mov eax, ebx
mov dword [esi + 0x10], ecx
test dword [edi + 0x78], 0x400
je 0x40dab9
or ecx, 0x4000
mov dword [esi + 0x10], ecx
test byte [eax], 4
je 0x40dac7
or ecx, 0x100
mov dword [esi + 0x10], ecx
mov eax, dword [ebp + 8]
mov ebx, 1
test byte [eax + 6], 2
je 0x40daf4
or ecx, 0x80
mov word [esi + 0x20], bx
mov dword [esi + 0x10], ecx
cmp word [edi + 0x18], 3
jne 0x40daf9
mov eax, 0x2000
or word [edi + 0x7c], ax
jmp 0x40daf9
or word [esi + 0x20], 0x20
mov ecx, dword [edx + 0x3c]
mov dword [esi + 0x18], ecx
mov eax, dword [edx + 0x40]
mov dword [esi + 0x1c], eax
cmp cx, 0xd
jne 0x40db55
mov ecx, dword [0x49f5b4]
movsx edx, word [edx]
cmp edx, dword [ecx + 0x194]
jge 0x40db48
mov eax, dword [ecx + 0x198]
movzx eax, word [eax + edx*2]
imul edx, eax, 0x2c
mov dword [ecx + 0x1a0], eax
add edx, dword [ecx + 0x400]
je 0x40db48
mov ecx, dword [edx + 0x24]
test ecx, ecx
je 0x40db48
mov edx, dword [edx + 0xc]
call fcn.00449b60
jmp 0x40db4a
xor eax, eax
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x40db55
mov word [esi + 0x18], ax
cmp dword [edi + 0xcc], 0
jne 0x40db7a
or word [esi + 0x20], 2
mov eax, ebx
or dword [esi + 0x10], 8
mov ecx, dword [esi + 0x10]
movzx ecx, cx
pop edi
mov word [esi + 0x22], cx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, word [esi + 0x10]
pop edi
mov word [esi + 0x22], ax
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret