joyce8/EMBER2024-capa huggingface dataset:
Function at 0x458844
Capabilities:
Read file on windows

Disassembly:
push ebx
xor eax, eax
push eax
push eax
push eax
push eax
push eax
mov eax, dword [esp + 0x1c]
mov dword [0x450efc], eax
mov dword [esp], 0
mov edx, 0x44702e
lea ecx, [esp + 4]
call fcn.00401178
push 0
lea eax, [esp + 0xc]
push eax
push 4
lea eax, [esp + 0xc]
push eax
push dword [0x44f96c]
call sub.KERNEL32.dll_ReadFile
and eax, eax
je 0x45889d
mov ebx, dword [esp + 8]
cmp ebx, 4
jne 0x45889d
mov eax, 1
jmp 0x45889f
xor eax, eax
and eax, eax
je 0x458942
mov ebx, dword [esp]
and ebx, ebx
jle 0x458942
push dword [esp]
call fcn.00412580
mov dword [esp + 0xc], eax
cmp dword [esp + 0xc], 0
je 0x458942
mov dword [esp + 0x10], 0
push 0
lea eax, [esp + 0xc]
push eax
mov ebx, dword [esp + 8]
sub ebx, dword [esp + 0x18]
push ebx
mov ebx, dword [esp + 0x18]
add ebx, dword [esp + 0x1c]
push ebx
push dword [0x44f96c]
call sub.KERNEL32.dll_ReadFile
mov ebx, eax
and ebx, ebx
jne 0x4588fc
jmp 0x458911
mov ebx, dword [esp + 0x10]
add ebx, dword [esp + 8]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x10]
cmp ebx, dword [esp]
jne 0x4588cd
push dword [0x450efc]
push dword [0x450efc]
push 2
push dword [esp + 0xc]
push dword [esp + 0x1c]
call fcn.00412cb0
lea eax, [esp + 8]
push eax
call fcn.00412ff0
push dword [esp + 0xc]
call fcn.00412bd0
mov edx, dword [esp + 4]
push dword [0x450efc]
push edx
call fcn.00413050
pop eax
add eax, dword [0x44efbc]
jmp 0x45896b
push dword [esp + 4]
call fcn.004130a0
add esp, 0x14
pop ebx
ret
Function at 0x4596a2
Capabilities:
Get common file path

Disassembly:
push ebx
push edi
xor eax, eax
push eax
push eax
mov eax, dword [esp + 0x14]
mov dword [0x450efc], eax
push dword [0x44f9e0]
mov edx, 0x44702e
pop ecx
call fcn.00401180
jne 0x4596e2
mov edx, dword [0x44f9e0]
push dword [0x450efc]
push edx
call fcn.00413050
pop eax
add eax, dword [0x44efbc]
jmp 0x459927
push dword [0x450efc]
push dword [0x450efc]
call fcn.004111d4
lea eax, [0x44f9e0]
push eax
call fcn.00412ff0
lea eax, [esp]
push eax
push 0x1a
push 0
call sub.SHELL32.dll_SHGetSpecialFolderLocation
mov ebx, eax
and ebx, ebx
jne 0x45976c
push dword [0x450efc]
push dword [0x450efc]
push 0x104
call fcn.00410210
lea eax, [0x44f9e0]
push eax
call fcn.00412ff0
mov eax, dword [0x44f9e0]
push eax
push dword [esp + 4]
call sub.SHELL32.dll_SHGetPathFromIDListW
mov ebx, eax
and ebx, ebx
jne 0x45976c
push dword [0x450efc]
push dword [0x450efc]
call fcn.004111d4
lea eax, [0x44f9e0]
push eax
call fcn.00412ff0
push dword [0x450efc]
push dword [0x450efc]
push 1
push dword [0x44f9e0]
call fcn.00410190
add dword [0x450efc], 2
mov edx, 0x447728
pop ecx
mov dword [0x450efc], ecx
add ecx, dword [0x44efbc]
call fcn.00401180
jne 0x4597d3
mov edx, dword [0x44f9e0]
push dword [0x450efc]
push edx
call fcn.00413050
mov edx, 0x447512
push edx
call fcn.00413050
lea eax, [0x44f9e0]
push eax
call fcn.00412ff0
jmp 0x4597fc
mov edx, dword [0x44f9e0]
push dword [0x450efc]
push edx
call fcn.00413050
mov edx, str.PureBasic_
push edx
call fcn.00413050
lea eax, [0x44f9e0]
push eax
call fcn.00412ff0
push dword [0x44f9e0]
call fcn.00410ec7
push edx
push eax
pop ebx
pop edi
cmp ebx, 0xfffffffe
jne 0x459819
cmp edi, 0xffffffff
jne 0x459819
xor eax, eax
jmp 0x45981e
mov eax, 1
or eax, eax
je 0x4598fc
mov dword [esp + 4], 3
mov ebx, dword [esp + 4]
inc ebx
push ebx
mov eax, 0x447728
push eax
push dword [0x44f9e0]
call fcn.0040f940
mov ebx, eax
and ebx, ebx
jle 0x4598fc
mov ebx, dword [esp + 4]
inc ebx
push ebx
mov eax, 0x447728
push eax
push dword [0x44f9e0]
call fcn.0040f940
mov dword [esp + 4], eax
push dword [0x450efc]
push dword [0x450efc]
push dword [0x450efc]
push dword [esp + 0x10]
push dword [0x44f9e0]
call fcn.0040f9c0
mov edx, dword [0x44efbc]
add dword [esp], edx
call fcn.00410ec7
pop dword [0x450efc]
push edx
push eax
pop ebx
pop edi
cmp ebx, 0xfffffffe
jne 0x4598b1
cmp edi, 0xffffffff
jne 0x4598b1
xor eax, eax
jmp 0x4598b6
mov eax, 1
or eax, eax
je 0x4598f7
push dword [0x450efc]
push dword [0x450efc]
push dword [0x450efc]
push dword [esp + 0x10]
push dword [0x44f9e0]
call fcn.0040f9c0
mov edx, dword [0x44efbc]
add dword [esp], edx
call fcn.004108bb
pop dword [0x450efc]
mov ebx, eax
and ebx, ebx
jne 0x4598f7
jmp 0x4598fc
jmp 0x45982e
mov edx, dword [0x44f9e0]
push dword [0x450efc]
push edx
call fcn.00413050
pop eax
add eax, dword [0x44efbc]
jmp 0x459927
add esp, 8
pop edi
pop ebx
ret
Function at 0x45fac3
Capabilities:
Create pipe

Disassembly:
push ebx
xor eax, eax
push eax
push dword [0x450efc]
mov edx, str..pipePureUnit_CommunicationPipe
push edx
call fcn.00413050
push dword [0x450efc]
push dword [0x450efc]
push 0x186a0
call fcn.00402b30
cdq
push edx
push eax
call fcn.00410260
pop eax
lea eax, [esp + 4]
push eax
call fcn.00412ff0
push 0
push 0x3e8
push 0x3e8
push 0
push 1
push 0
push 1
mov eax, dword [esp + 0x1c]
push eax
call sub.KERNEL32.dll_CreateNamedPipeW
mov dword [0x44f96c], eax
mov ebx, dword [0x44f96c]
cmp ebx, 0xffffffff
je 0x45fb55
push dword [esp]
mov eax, str.PUREUNIT_COMMUNICATION_PIPE
push eax
call fcn.00401c86
mov eax, 1
jmp 0x45fb5b
xor eax, eax
jmp 0x45fb5b
push dword [esp]
call fcn.004130a0
add esp, 4
pop ebx
ret

Function at 0x45fb68
Capabilities:
Query or enumerate registry value

Disassembly:
push ebx
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push eax
mov eax, dword [esp + 0x28]
mov dword [0x450efc], eax
mov edx, dword [esp + 0x24]
lea ecx, [esp]
call fcn.00401170
mov edx, 0x44702e
lea ecx, [esp + 4]
call fcn.00401178
lea eax, [esp + 8]
push eax
push 1
push 0
push dword [esp + 0xc]
push dword [esp + 0x30]
call sub.ADVAPI32.dll_RegOpenKeyExW
mov ebx, eax
and ebx, ebx
jne 0x45fc95
lea eax, [esp + 0x10]
push eax
push 0
lea eax, [esp + 0x14]
push eax
push 0
mov eax, 0x44702e
push eax
push dword [esp + 0x1c]
call sub.ADVAPI32.dll_RegQueryValueExW
mov ebx, eax
and ebx, ebx
jne 0x45fc8c
push dword [0x450efc]
push dword [0x450efc]
push dword [esp + 0x18]
call fcn.00410210
lea eax, [esp + 0x18]
push eax
call fcn.00412ff0
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x18]
push eax
push 0
push 0
mov eax, 0x44702e
push eax
push dword [esp + 0x1c]
call sub.ADVAPI32.dll_RegQueryValueExW
mov ebx, eax
and ebx, ebx
jne 0x45fc8c
push dword [0x450efc]
push dword [0x450efc]
push 2
mov eax, 0x447226
push eax
push dword [esp + 0x24]
call fcn.0040f940
mov ebx, eax
add ebx, 0xfffffffe
push ebx
push 2
push dword [esp + 0x24]
call fcn.0040fa60
lea eax, [esp + 8]
push eax
call fcn.00412ff0
push dword [0x450efc]
push dword [0x450efc]
push dword [esp + 0xc]
call fcn.00411206
lea eax, [esp + 8]
push eax
call fcn.00412ff0
push dword [esp + 8]
call sub.ADVAPI32.dll_RegCloseKey
mov edx, dword [esp + 4]
push dword [0x450efc]
push edx
call fcn.00413050
pop eax
add eax, dword [0x44efbc]
jmp 0x45fcbe
push dword [esp + 0x14]
call fcn.004130a0
push dword [esp + 4]
call fcn.004130a0
push dword [esp]
call fcn.004130a0
add esp, 0x18
pop ebx
ret 8
Function at 0x402050
Capabilities:
Connect socket
Get hostname
Get local ipv4 addresses
Get socket information
Resolve dns

Disassembly:
sub esp, 0xe4
lea eax, [esp + 0x24]
push 0xbf
push eax
mov dword [esp + 0x10], 0
call sub.WS2_32.dll_gethostname
cmp eax, 0xffffffff
je 0x40208b
lea ecx, [esp + 0x24]
push ecx
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x40208b
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov dword [esp + 8], eax
jmp 0x40208f
mov eax, dword [esp + 8]
test eax, eax
push esi
jne 0x4020fa
push eax
push 2
push 2
call sub.WS2_32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
je 0x4020f6
push 7
mov dword [esp + 8], 0x10
mov word [esp + 0x1c], 2
call sub.WS2_32.dll_htons
push 0x420444
mov word [esp + 0x1e], ax
call sub.WS2_32.dll_inet_addr
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push 0x10
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
je 0x4020f0
lea ecx, [esp + 4]
lea edx, [esp + 8]
push ecx
push edx
push esi
call sub.WS2_32.dll_getsockname
push esi
call sub.WS2_32.dll_closesocket
mov eax, dword [esp + 0xc]
pop esi
add esp, 0xe4
ret

Function at 0x402470
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x42047c]
sub esp, 0x54
test eax, eax
je 0x4025d8
mov dword [0x42047c], 0
call fcn.00402250
lea eax, [esp + 4]
lea ecx, [esp]
push eax
push ecx
call fcn.00401570
add esp, 8
test eax, eax
jle 0x402560
mov ecx, dword [esp]
mov dword [esp + 8], 0x4207f0
cmp ecx, 0x600
mov dword [esp + 0xc], 0x4207d4
mov dword [esp + 0x10], 0x4207ac
mov dword [esp + 0x14], 0x420784
mov dword [esp + 0x18], 0x420760
mov dword [esp + 0x1c], 0x420730
mov dword [esp + 0x20], 0x420708
mov dword [esp + 0x24], 0x4206dc
mov dword [esp + 0x28], 0x4206b8
mov dword [esp + 0x2c], 0x420688
mov dword [esp + 0x30], 0x420660
mov dword [esp + 0x34], 0x42063c
mov dword [esp + 0x38], 0x420614
mov dword [esp + 0x3c], 0x4205f0
mov dword [esp + 0x40], 0x4205c0
mov dword [esp + 0x44], 0x420590
mov dword [esp + 0x48], 0x42056c
mov dword [esp + 0x4c], 0x420540
mov dword [esp + 0x50], 0x42051c
jae 0x402560
mov edx, dword [esp + eax*4 + 8]
mov eax, dword [0x430c20]
push edx
push eax
call fcn.00401500
add esp, 8
mov ecx, dword [0x430c20]
push esi
mov esi, dword [esp + 0x5c]
push esi
push ecx
call fcn.00412ab0
add esp, 8
test eax, eax
jne 0x40258d
mov edx, dword [0x430c20]
push 0x4204e8
push edx
call fcn.00401500
add esp, 8
mov eax, dword [0x430c20]
push esi
push eax
call fcn.004135b0
add esp, 8
test eax, eax
pop esi
jne 0x4025b5
mov ecx, dword [0x430c20]
push 0x4204b4
push ecx
call fcn.00401500
add esp, 8
call fcn.00401a40
cmp eax, 0xffffffff
jne 0x4025d3
mov edx, dword [0x430c20]
push 0x4204a4
push edx
call fcn.00401500
add esp, 8
call fcn.0040a790
push 0xf8
push 0x163
call fcn.00403270
push 0x4f
mov dword [0x430d00], 1
call fcn.00403530
push 1
push 0
call fcn.004072e0
call fcn.004084e0
push 1
call fcn.004021c0
add esp, 0x18
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x402f00
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e270
push 0x41579c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov esi, dword [ebp + 8]
mov dword [0x430818], esi
push 0x420c70
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x430c44], eax
test eax, eax
jne 0x402f5a
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402f7c
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push esi
call fcn.00403060
add esp, 0xc
test eax, eax
jne 0x402fb2
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [0x430c20]
push edx
call fcn.00412c60
push 0
push 0
call fcn.00412cf0
add esp, 0xc
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push 0
push 0x430c28
call esi
test eax, eax
je 0x403008
cmp dword [0x430c2c], 0x12
je 0x403037
push 0x430c28
call edi
push 0x430c28
call ebx
jmp 0x402fdc
mov eax, dword [0x430c1c]
test eax, eax
je 0x40301f
mov eax, dword [ebp + 8]
push eax
call fcn.00402470
add esp, 4
jmp 0x402fdc
call dword [sym.imp.USER32.dll_WaitMessage]
jmp 0x402fdc
mov dword [ebp - 4], 0xffffffff
mov eax, dword [0x430c30]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x403060
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x30
push ebx
push esi
xor ebx, ebx
push edi
mov dword [0x680980], ebx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call fcn.0041c8b6
mov esi, eax
push 0x420ca8
push esi
call fcn.00415880
add esp, 0xc
test eax, eax
je 0x403098
mov dword [0x680980], 1
push 0x420ca4
push esi
call fcn.00415880
add esp, 8
test eax, eax
je 0x4030b4
mov dword [0x6808c8], 1
push 0x420c9c
push esi
call fcn.00415880
add esp, 8
test eax, eax
je 0x4030cc
mov byte [0x420480], bl
push 0x420c90
push esi
call fcn.00415880
add esp, 8
test eax, eax
je 0x4030e5
mov byte [0x430cfc], 1
push 0x420c84
push esi
call fcn.00415880
add esp, 8
test eax, eax
je 0x4030fd
mov byte [0x420481], bl
push 0x420c7c
push esi
call fcn.00415880
add esp, 8
test eax, eax
je 0x403116
mov byte [0x430cfd], 1
mov esi, dword [esp + 0x40]
mov edi, dword [sym.imp.USER32.dll_LoadIconA]
push 0x66
push esi
mov dword [esp + 0x14], 0x30
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], 0x402620
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], esi
call edi
push 0x66
push esi
mov dword [esp + 0x2c], eax
call edi
push 0x7f00
push ebx
mov dword [esp + 0x40], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 4
mov dword [esp + 0x2c], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0xc]
mov edi, 0x4200cc
push eax
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
call dword [sym.imp.USER32.dll_RegisterClassExA]
test ax, ax
jne 0x403198
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x30
ret
cmp dword [0x680980], ebx
je 0x403202
mov ecx, dword [0x422630]
mov edx, dword [0x422624]
push ebp
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push ebx
push ebx
push ecx
push edx
push 1
call esi
mov edx, dword [0x422630]
push 8
sub eax, edx
cdq
sub eax, edx
mov ebp, eax
sar ebp, 1
call esi
sub ebp, eax
push ebp
push ebx
call esi
mov edx, dword [0x422624]
push 7
sub eax, edx
cdq
sub eax, edx
mov ebp, eax
sar ebp, 1
call esi
sub ebp, eax
push ebp
push 0x81880000
push edi
push edi
push ebx
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x430c20], eax
pop ebp
jmp 0x40322b
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push ebx
push ebx
push 1
call esi
push eax
push ebx
call esi
push eax
push ebx
push ebx
push closesocket
push edi
push edi
push 8
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x430c20], eax
cmp eax, ebx
jne 0x403238
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [esp + 0x48]
push ecx
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov edx, dword [0x430c20]
push edx
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [0x430c20]
push eax
call dword [sym.imp.USER32.dll_SetFocus]
push ebx
call dword [sym.imp.USER32.dll_ShowCursor]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x30
ret
Function at 0x4084e0
Capabilities:
Write file on windows

Disassembly:
push ecx
push 0x4207fc
call fcn.004086c0
mov eax, dword [0x430738]
add esp, 4
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov ecx, dword [0x430c20]
push ecx
call fcn.00412cc0
add esp, 4
call fcn.0040e770
mov eax, dword [0x430d38]
test eax, eax
je 0x408530
push 0x422060
push 0x26
push 0x422034
push eax
call fcn.00415390
add esp, 0x10
mov eax, dword [0x6808fc]
test eax, eax
je 0x408546
push 0x6808fc
call fcn.0040c130
add esp, 4
mov eax, dword [0x6808f8]
test eax, eax
je 0x40855c
push 0x6808f8
call fcn.0040c130
add esp, 4
call fcn.00402170
mov eax, dword [0x680904]
test eax, eax
je 0x408577
push 0x680904
call fcn.0040bf00
add esp, 4
mov eax, dword [0x680910]
test eax, eax
je 0x40858d
push 0x680910
call fcn.0040bf00
add esp, 4
mov eax, dword [0x68090c]
test eax, eax
je 0x4085a3
push 0x68090c
call fcn.0040c690
add esp, 4
mov eax, dword [0x6808f4]
test eax, eax
je 0x4085c1
push 0x422028
push 0x34
push 0x422034
push eax
call fcn.00415390
add esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push 0x420364
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebp, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
cmp esi, 0xffffffff
je 0x40860e
lea edx, [esp + 0x10]
push 0
push edx
push 0x124
push 0x44a840
push esi
call ebx
push esi
call ebp
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push 0x420328
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x40864d
lea eax, [esp + 0x10]
push 0
push eax
mov eax, dword [0x680918]
mov ecx, eax
shl ecx, 4
add ecx, eax
push ecx
push 0x44da10
push esi
call ebx
push esi
call ebp
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push 0x4203c4
call edi
mov esi, eax
cmp esi, 0xffffffff
je 0x408684
lea edx, [esp + 0x10]
push 0
push edx
push 0x2df0
push 0x44ac10
push esi
call ebx
push esi
call ebp
call fcn.00413790
call fcn.00412c00
mov eax, dword [0x6808c8]
test eax, eax
jne 0x4086ba
xor esi, esi
push esi
push 0x42ca50
call fcn.00414720
add esp, 8
inc esi
cmp esi, 5
jle 0x408699
push 0x42ca50
call fcn.00413ce0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x4086c0
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [0x430738]
cmp eax, 0xffffffff
jne 0x4086cd
xor eax, eax
ret
push esi
mov esi, dword [esp + 8]
push edi
push esi
push eax
push 0x4222f0
call fcn.004159fe
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [0x430738]
push 0
not ecx
dec ecx
push ecx
push esi
push eax
call dword [sym.imp.WS2_32.dll_send]
pop edi
pop esi
ret
Function at 0x40ab10
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x5c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp]
push ebx
push esi
push edi
mov edi, 0x44a97c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x420090
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x6c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
xor ebx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x70]
cmp esi, ebx
jne 0x40abb1
lea eax, [esp + 0xc]
push eax
push 0x4254a4
call fcn.00401470
add esp, 8
push ebx
push 0x80
push 3
push ebx
push ebx
lea ecx, [esp + 0x20]
push closesocket
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40abe4
lea edx, [esp + 0xc]
push edx
push 0x425488
call fcn.00401470
add esp, 8
lea eax, [esp + 0x6c]
push ebx
push eax
push 0x300
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x6c], 0x300
je 0x40ac13
lea ecx, [esp + 0xc]
push ecx
push 0x42546c
call fcn.00401470
add esp, 8
xor eax, eax
mov cl, byte [eax + esi]
shr cl, 2
mov byte [eax + esi], cl
inc eax
cmp eax, 0x300
jl 0x40ac15
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x43081d
lea ecx, [esi + 2]
mov dl, byte [ecx - 2]
add eax, 4
shl dl, 2
mov byte [eax - 5], dl
mov dl, byte [ecx - 1]
shl dl, 2
mov byte [eax - 4], dl
mov dl, byte [ecx]
shl dl, 2
mov byte [eax - 3], dl
mov byte [eax - 2], bl
add ecx, 3
cmp eax, 0x430c1d
jl 0x40ac35
pop edi
pop esi
pop ebx
add esp, 0x5c
ret
Function at 0x40bd30
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x114
push ebx
push ebp
push esi
push edi
mov edi, 0x684c14
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x20]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x20], 0
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x20]
and ecx, 3
mov ebp, dword [esp + 0x12c]
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x128]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
test ebp, ebp
rep movsb byte es:[edi], byte [esi]
jne 0x40bdaa
lea ebp, [esp + 0x1e]
push 0
push 0x80
push 3
push 0
push 0
lea eax, [esp + 0x34]
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40bddb
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x130]
test ecx, ecx
je 0x40bdf4
lea edx, [eax - 2]
mov dword [ecx], edx
lea ebx, [eax - 2]
mov eax, dword [esp + 0x128]
push eax
push 0x106
push 0x4255c8
push ebx
call fcn.00415350
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x40be2c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x114
ret
lea ecx, [esp + 0x14]
push 0
push ecx
push 2
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x14]
push 0
push edx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x128]
xor eax, eax
mov ax, word [ebp]
push esi
push 0x10b
push 0x4255c8
shl eax, 2
push eax
call fcn.00415350
add esp, 0x10
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40bea1
push esi
push 0x10c
push 0x4255c8
push edi
call fcn.00415390
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret
xor esi, esi
mov dword [esp + 0x10], 0
cmp word [ebp], si
jbe 0x40beee
mov ebx, eax
lea eax, [esi + edi]
xor ecx, ecx
xor edx, edx
mov dword [ebx], eax
mov cx, word [edi + esi + 2]
mov dx, word [eax]
imul ecx, edx
push eax
lea esi, [esi + ecx*2 + 4]
call 0x410261
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov cx, word [ebp]
add esp, 4
inc eax
add ebx, 4
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x40beb3
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x114
ret