joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403400
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
sub esp, 0x304
push ebx
push ebp
push esi
mov esi, dword [esp + 0x314]
mov ebp, ecx
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp], 0x409798
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call sub.MFC42.DLL_operatornew
mov edi, dword [esp + 0x320]
mov dword [0x40c518], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call sub.MFC42.DLL_operatornew
mov dword [0x40c51c], eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebx, dword [sym.imp.MSVCRT.dll__strlwr]
mov eax, ecx
mov esi, edi
mov edi, dword [0x40c518]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x40c518]
push ecx
call ebx
mov edi, dword [esp + 0x328]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x40c51c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40c51c]
push eax
call ebx
mov ecx, dword [esp + 0x330]
add esp, 0x10
lea edx, [esp + 0x114]
mov dword [0x40c070], ecx
push 0xff
push edx
push 0
mov dword [ebp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x14]
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
push 0x5c
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x17], al
lea ecx, [esp + 0x118]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x21c]
lea edi, [edx + 1]
mov dword [esp + 0x18], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x21c]
mov byte [edx], 0
push ecx
call ebx
add esp, 0xc
push str.flash
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
lea edx, [esp + 0x14]
push edx
call fcn.00403c70
cmp eax, 0x20
jg 0x40357e
mov ecx, ebp
mov dword [ebp + 0xc], 1
call fcn.00403740
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x304
ret 0xc
Function at 0x403740
Capabilities:
Get common file path

Disassembly:
sub esp, 0x38
push ebx
push esi
xor esi, esi
push edi
mov edi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0x30
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0x4036b0
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], str.AStuckWnd
mov dword [esp + 0x44], esi
call dword [sym.imp.USER32.dll_RegisterClassExA]
push esi
push ebx
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0x40c0ac
push str.AStuckWnd
push esi
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, esi
mov dword [edi + 4], eax
jne 0x4037c4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x38
ret
lea ecx, [esp + 0xc]
mov dword [esp + 0x10], 1
push ecx
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40381d
push str.Shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, esi
je 0x40381d
push str.SHChangeNotifyRegister
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [edi + 4]
lea edx, [esp + 0xc]
push edx
push 1
push 0x458
push 0x100
push 2
push ecx
call eax
push ebx
mov dword [edi + 8], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [edi + 8]
xor eax, eax
cmp ecx, esi
pop edi
pop esi
pop ebx
setne al
add esp, 0x38
ret
Function at 0x403f90
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x1000
call fcn.00407b00
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x10]
push 0x64
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x10]
push 0x40c208
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
mov ebp, eax
push 2
push 0xffffffffffffffce
push ebp
call ebx
push ebp
push 0x32
lea edx, [esp + 0x82c]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x24
push 1
push 0xffffffffffffff9c
push ebp
call ebx
push ebp
push 0x32
lea eax, [esp + 0x24]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov al, byte [esp + 0x5d]
add esp, 0x1c
cmp al, 0xaa
jne 0x40408f
or ecx, 0xffffffff
mov edi, str.___
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x810]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x810]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x403fe2
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
lea edi, [esp + 0x814]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x1014]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x810]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
pop edi
dec ecx
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x1000
ret

Function at 0x4040e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x64
lea eax, [esp]
push esi
push edi
push 0x64
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 8]
push 0x40c208
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
push 2
push 0xffffffffffffffce
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
push 0x32
lea edx, [esp + 0x24]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x28
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x70]
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]
lea edi, [esp + 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
mov eax, ecx
pop esi
add esp, 0x64
ret
Function at 0x404e90
Capabilities:
Access peb ldr_data
Get ntdll base address
Get number of processors
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x408808
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov eax, dword [esi + 0xc]
xor edi, edi
push eax
mov dword [esp + 0x8c], edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [esi + 0xc]
push 0x64
push 0x78
push ecx
mov ebx, eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ebp, eax
push ebp
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebx
mov dword [esp + 0x1c], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
push 3
push ebx
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0xc]
push 0xcc0020
push edx
push eax
push edi
push edi
push ecx
push 0x64
push 0x78
push edi
push edi
push ebx
call dword [sym.imp.GDI32.dll_StretchBlt]
xor edx, edx
mov ecx, 0xa
mov dword [esp + 0x1c], edx
xor eax, eax
mov dword [esp + 0x20], edx
mov word [esp + 0x22], di
mov dword [esp + 0x24], edx
mov word [esp + 0x24], di
lea edi, [esp + 0x2c]
push eax
rep stosd dword es:[edi], eax
mov dword [esp + 0x40], eax
lea eax, [esp + 0x58]
push eax
mov ecx, 0xa
lea esi, [esp + 0x34]
lea edi, [esp + 0x5c]
push edx
mov dword [esp + 0x38], 0x28
mov dword [esp + 0x3c], 0x78
mov dword [esp + 0x40], 0x64
mov word [esp + 0x44], 1
mov word [esp + 0x46], 0x18
push 1
push edx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.GDI32.dll_GetDIBits]
push ebp
mov word [esp + 0x40], dx
push ebx
mov word [esp + 0x38], 0x4d42
mov dword [esp + 0x3a], 0x8cd6
mov dword [esp + 0x42], 0x36
call edi
mov eax, dword [esp + 0x30]
lea esi, [eax + eax*2]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
imul esi, eax
push esi
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x18]
add esp, 4
lea ecx, [esp + 0x54]
mov dword [esp + 0x10], eax
push 0
push ecx
push eax
push edx
push 0
push ebp
push ebx
call edi
mov eax, dword [esp + 0x90]
push 0x40c068
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x405024
push edi
push 1
lea ecx, [esp + 0x24]
push 0xe
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
push edi
push 1
lea edx, [esp + 0x44]
push 0x28
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [esp + 0x30]
push edi
push 1
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x34
mov ecx, dword [esp + 0x10]
push ecx
call sub.MFC42.DLL_operatordelete
mov edx, dword [esp + 0x1c]
add esp, 4
push edx
push ebx
call dword [sym.imp.GDI32.dll_SelectObject]
push ebp
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
lea ecx, [esp + 0x90]
mov dword [esp + 0x88], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x80]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x7c
ret 4
Function at 0x4054c0
Capabilities:
Initialize winsock library

Disassembly:
push ebx
push esi
mov ebx, ecx
push edi
xor eax, eax
push 0x200
mov dword [ebx + 0x1b8], eax
mov dword [ebx + 0x1c0], eax
mov dword [ebx + 0x1bc], eax
mov dword [ebx + 0x1c4], eax
call sub.MFC42.DLL_operatornew
push 0x100
mov dword [ebx + 0x1b0], eax
call sub.MFC42.DLL_operatornew
mov edx, eax
mov eax, dword [esp + 0x18]
or ecx, 0xffffffff
mov dword [ebx + 0x194], eax
mov edi, str.TheComputerOfTheGhost
xor eax, eax
add esp, 8
mov dword [ebx + 0x1b4], edx
mov dword [ebx + 0x198], ecx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebx + 4]
push ecx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebx], eax
pop edi
mov eax, ebx
pop esi
pop ebx
ret 4

Function at 0x405570
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ecx
mov eax, dword [esp + 8]
push esi
push edi
mov esi, ecx
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40558d
pop edi
or eax, 0xffffffff
pop esi
pop ecx
ret 8
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esi + 0x1a0], eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 0x19e], ax
mov eax, dword [esi + 0x194]
lea edi, [esi + 0x19c]
cmp eax, 0xffffffff
mov word [edi], 2
jne 0x4055e2
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x194], eax
mov eax, dword [esi + 0x194]
cmp eax, 0xffffffff
jne 0x4055f5
pop edi
or eax, eax
pop esi
pop ecx
ret 8
push 0x10
push edi
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40560c
pop edi
or eax, eax
pop esi
pop ecx
ret 8
mov edx, dword [esi + 0x194]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [esp + 0x10]
push 4
push ecx
push 0x1006
push 0xffff
push edx
mov dword [esp + 0x24], 0x7530
call edi
mov ecx, dword [esi + 0x194]
lea eax, [esp + 8]
push 4
push eax
push 0x1005
push 0xffff
push ecx
mov dword [esp + 0x1c], 0x7530
call edi
pop edi
xor eax, eax
pop esi
pop ecx
ret 8
Function at 0x4056c0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x14
or eax, 0xffffffff
push ebx
push ebp
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x194], eax
je 0x4057f6
mov ecx, dword [esi + 0x198]
mov ebp, dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [esp + 0x10]
mov ebx, 1
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x1c], ebx
call ebp
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x28]
lea edi, [eax + eax*4]
shl edi, 1
cmp edi, ebx
jl 0x405766
mov edx, dword [esi + 0x198]
push 0
push 0
push edx
call dword [sym.imp.WS2_32.dll_accept]
mov dword [esi + 0x1ac], eax
mov eax, dword [esi + 0x1bc]
test eax, eax
je 0x405739
mov ecx, dword [esi + 0x1c4]
push ecx
call eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x405750
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x405766
cmp dword [esi + 0x1ac], 0xffffffff
jne 0x405766
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, edi
jle 0x40570f
mov eax, dword [esi + 0x198]
lea edx, [esp + 0x14]
push edx
xor edi, edi
push 0x8004667e
push eax
mov dword [esp + 0x20], edi
call ebp
mov eax, dword [esi + 0x1ac]
cmp eax, 0xffffffff
jne 0x405796
pop edi
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x14
ret 4
lea ecx, [esp + 0x18]
mov dword [esi + 0x194], eax
push ecx
push 0x8004667e
push eax
mov dword [esp + 0x24], edi
call ebp
mov eax, dword [esi + 0x194]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea edx, [esp + 0x1c]
push 4
push edx
push 0x1006
mov ebx, 0x7530
push 0xffff
push eax
mov dword [esp + 0x30], ebx
call edi
mov edx, dword [esi + 0x194]
lea ecx, [esp + 0x20]
push 4
push ecx
push 0x1005
push 0xffff
push edx
mov dword [esp + 0x34], ebx
call edi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 4
Function at 0x4058d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x408
mov al, byte [0x40c520]
push ebx
push esi
mov esi, ecx
push edi
mov byte [esp + 0xc], al
mov ecx, 0x101
xor eax, eax
lea edi, [esp + 0xd]
mov edx, dword [esi + 0x194]
rep stosd dword es:[edi], eax
push 0
lea ecx, [esp + 0x10]
stosb byte es:[edi], al
mov edi, dword [sym.imp.WS2_32.dll_recv]
push 1
push ecx
push edx
call edi
cmp eax, 1
jl 0x405a04
mov al, byte [esp + 0xc]
mov bl, 0x3e
cmp al, bl
jne 0x405a04
mov ecx, dword [esi + 0x194]
push 0
lea eax, [esp + 0x11]
push 1
push eax
push ecx
call edi
cmp eax, 1
jl 0x405a04
cmp byte [esp + 0xd], bl
jne 0x405a04
mov eax, dword [esi + 0x194]
push 0
lea edx, [esp + 0x12]
push 1
push edx
push eax
call edi
cmp eax, 1
jl 0x405a04
mov edx, dword [esi + 0x194]
push 0
lea ecx, [esp + 0x13]
push 1
push ecx
push edx
call edi
cmp eax, 1
jl 0x405a04
movsx ebx, byte [esp + 0xf]
mov eax, dword [esp + 0xe]
shl ebx, 8
and eax, 0xff
add ebx, eax
cmp ebx, 0x400
jg 0x405a04
lea ecx, [ebx - 4]
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.00405ef0
mov eax, dword [esp + 0x418]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0xc]
mov edi, eax
push 0x40c298
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_strtok]
mov byte [ebx + eax], 0
lea eax, [esp + 0x14]
push eax
call esi
push 0x40c298
push 0
call esi
push 0x40c298
push 0
call esi
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 0x1c
mov eax, ebx
pop edi
pop esi
pop ebx
add esp, 0x408
ret 4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x408
ret 4

Function at 0x405a20
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x410
mov eax, dword [esp + 0x414]
push edi
push 0x40c068
mov edi, ecx
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 8], eax
test eax, eax
je 0x405add
push ebx
mov ebx, dword [esp + 0x420]
push ebp
push esi
mov dword [esp + 0x10], ebx
xor ebp, ebp
cmp ebx, 0x400
mov eax, 0x400
jge 0x405a6a
mov eax, ebx
lea ecx, [esp + 0x18]
push eax
push ecx
mov ecx, edi
call fcn.00405ef0
mov esi, eax
test esi, esi
jle 0x405aba
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push edx
push 1
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [edi + 0x1b8]
add esp, 0x10
sub ebx, esi
add ebp, esi
test eax, eax
je 0x405ab0
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 0x1c0]
push ecx
push ebp
push edx
call eax
cmp ebx, 1
jl 0x405aba
cmp esi, 1
jge 0x405a5b
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test esi, esi
pop esi
pop ebp
pop ebx
jle 0x405add
mov eax, dword [esp + 4]
pop edi
add esp, 0x410
ret 8
or eax, 0xffffffff
pop edi
add esp, 0x410
ret 8
Function at 0x405af0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x40c
push ebx
push edi
push 0x40c06c
mov ebx, ecx
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x405baa
push ebp
push esi
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push edi
call esi
push edi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push edi
mov dword [esp + 0x2c], eax
call esi
add esp, 0x1c
xor ebp, ebp
push edi
push 0x400
lea ecx, [esp + 0x1c]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, eax
add esp, 0x10
test esi, esi
je 0x405b68
lea edx, [esp + 0x14]
push esi
push edx
mov ecx, ebx
call fcn.00405e80
mov esi, eax
mov eax, dword [ebx + 0x1b8]
add ebp, esi
test eax, eax
je 0x405b83
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 0x1c0]
push ecx
push ebp
push edx
call eax
cmp esi, 0x400
jge 0x405b3d
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test esi, esi
pop esi
pop ebp
jle 0x405baa
mov eax, dword [esp + 8]
pop edi
pop ebx
add esp, 0x40c
ret 4
pop edi
or eax, 0xffffffff
pop ebx
add esp, 0x40c
ret 4
Function at 0x405c20
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x408868
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x620
push esi
mov esi, ecx
mov dword [esp + 4], esi
lea eax, [esp + 0x114]
push 0x104
push eax
push 0
mov dword [esp + 0x638], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x114]
push 0x5c
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov byte [eax + 1], 0
mov eax, dword [esp + 0x640]
add esp, 8
test eax, eax
je 0x405c8d
push 0x78
mov ecx, esi
call fcn.004056c0
lea edx, [esp + 0x21c]
mov ecx, esi
push edx
call fcn.004058d0
test eax, eax
je 0x405dee
mov esi, dword [sym.imp.MSVCRT.dll_strtok]
push ebx
push ebp
push edi
lea eax, [esp + 0x22c]
push 0x40c298
push eax
call esi
push 0x40c298
push 0
mov ebp, eax
call esi
push 0x40c298
push 0
mov ebx, eax
call esi
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
mov dword [esp + 0x30], eax
lea edi, [esp + 0x13c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x34]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x34]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x40c520
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x660]
mov ecx, ebp
mov ebp, dword [sym.imp.MSVCRT.dll__mbscmp]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call ebp
add esp, 0x24
test eax, eax
jne 0x405d58
lea ecx, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, 0x40c1fc
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x40c520
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x1c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
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 eax, dword [esp + 0x644]
mov ecx, ebx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
add esp, 8
test eax, eax
pop edi
pop ebp
pop ebx
je 0x405dd7
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x634]
push ecx
push edx
jmp 0x405de1
mov eax, dword [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
mov ecx, dword [esp + 0xc]
call fcn.00405a20
mov esi, dword [esp + 4]
mov eax, dword [esp + 0x638]
test eax, eax
je 0x405e00
mov ecx, esi
call fcn.00405660
lea ecx, [esp + 0x634]
mov dword [esp + 0x62c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x624]
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x62c
ret 8
Function at 0x405e40
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x14
lea eax, [esp]
lea edx, [esp + 4]
push eax
mov eax, dword [ecx + 0x194]
push edx
push eax
mov dword [esp + 0xc], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::operator
add esp, 0x14
ret 4

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

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
test esi, esi
push edi
mov ebx, ecx
jle 0x405ed5
mov ebp, dword [sym.imp.WS2_32.dll_send]
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
cmp esi, 0x200
jle 0x405eb5
mov eax, dword [ebx + 0x194]
push 0
push 0x200
push edi
push eax
jmp 0x405ec4
test esi, esi
jle 0x405ed9
mov ecx, dword [ebx + 0x194]
push 0
push esi
push edi
push ecx
call ebp
cmp eax, 1
jl 0x405ed9
sub esi, eax
add edi, eax
test esi, esi
jg 0x405e9c
jmp 0x405ed9
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
cmp eax, 0xffffffff
pop ebx
jne 0x405ee7
or eax, eax
ret 8
mov eax, dword [esp + 8]
ret 8

Function at 0x405ef0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
mov ebx, ecx
mov ecx, dword [esp + 0xc]
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov edx, ecx
push edi
xor eax, eax
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
xor esi, esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, edx
test eax, eax
jle 0x405f41
mov edi, dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [ebx + 0x194]
push 0
lea eax, [esi + ebp]
push 1
push eax
push ecx
call edi
test eax, eax
je 0x405f4a
cmp eax, 0xffffffff
je 0x405f53
mov eax, dword [esp + 0x18]
inc esi
cmp esi, eax
jl 0x405f1e
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 8
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 8