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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x48f074]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x42b67c
cmp byte [esi + 0x3d], 0
je 0x42b67c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x42b66a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x42b631
sub eax, 1
je 0x42b635
sub eax, 2
jne 0x42b66a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047497b
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x42b653
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x42b66a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047497b
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047497b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0047497b
mov esp, ebp
pop ebp
ret
Function at 0x431f80
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x48f074]
xor eax, esp
mov dword [esp + 0x190], eax
mov eax, dword [0x48fcd8]
mov ecx, eax
inc eax
mov dword [0x48fcd8], eax
test ecx, ecx
je 0x431fbc
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.0047497b
add esp, 0x194
ret
cmp byte [esp + 0x19c], 0
je 0x431ff8
mov dword [sub.api_ms_win_crt_heap_l1_1_0.dll_malloc], 0x475be7
mov dword [0x48f044], 0x475bdb
mov dword [0x48f048], 0x475bcf
mov dword [0x48f04c], 0x475d13
mov dword [0x48f050], 0x475b9f
push ebx
call fcn.004368f0
test eax, eax
je 0x43203a
mov ebx, dword [esp + 0x19c]
test bl, 2
je 0x43205d
lea eax, [esp + 4]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x43203a
mov eax, dword [esp + 4]
cmp al, 2
jne 0x432055
shr eax, 8
cmp al, 2
jne 0x432055
call fcn.004403d0
test eax, eax
je 0x43205d
mov eax, 2
pop ebx
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.0047497b
add esp, 0x194
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x43203a
call fcn.00435700
test eax, eax
jne 0x43203a
call fcn.0043e4f0
mov eax, dword [0x48fdec]
test bl, 4
mov ecx, 1
mov dword [0x48fcdc], ebx
cmovne eax, ecx
mov dword [0x48fdec], eax
call fcn.00431b80
mov ecx, dword [esp + 0x194]
xor eax, eax
pop ebx
xor ecx, esp
call fcn.0047497b
add esp, 0x194
ret
Function at 0x43cac0
Capabilities:
Encode data using xor
Hash data using djb2

Disassembly:
sub esp, 0x18
mov eax, dword [0x48f074]
xor eax, esp
mov dword [esp + 0x14], eax
push edi
mov edi, dword [esp + 0x20]
test edi, edi
je 0x43cb9a
lea eax, [esp + 4]
push eax
push edi
push 2
call fcn.004574f0
add esp, 0xc
test eax, eax
jne 0x43cb9a
lea eax, [esp + 8]
push eax
push edi
push 0x17
call fcn.004574f0
add esp, 0xc
test eax, eax
jne 0x43cb9a
push ebx
push ebp
push esi
mov esi, edi
xor ebx, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x43cb15
sub esi, ecx
push esi
push 0x2e
push edi
call fcn.004574c0
add esp, 0xc
test eax, eax
je 0x43cb49
sub eax, edi
push eax
push 0x2e
push edi
call fcn.004574c0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x43cb4b
inc ebx
mov ecx, edi
sub ecx, ebx
add esi, ecx
test ebx, ebx
cmovne edi, ebx
xor ecx, ecx
xor ebp, ebp
mov ebx, 0x1505
lea eax, [esi + edi]
cmp edi, eax
cmova esi, ecx
test esi, esi
je 0x43cb84
mov al, byte [edi]
push eax
call fcn.00449350
movsx ecx, al
lea edi, [edi + 1]
mov eax, ebx
inc ebp
shl eax, 5
add esp, 4
add eax, ebx
xor ecx, eax
mov ebx, ecx
cmp ebp, esi
jb 0x43cb63
pop esi
pop ebp
movzx eax, bl
pop ebx
pop edi
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0047497b
add esp, 0x18
ret
mov ecx, dword [esp + 0x18]
xor eax, eax
pop edi
xor ecx, esp
call fcn.0047497b
add esp, 0x18
ret

Function at 0x43e4f0
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [0x48f060]
cmp eax, 0xffffffff
jne 0x43e532
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x43e518
xor eax, eax
test eax, eax
mov dword [0x48f060], eax
setg al
ret
push eax
push 0
mov dword [0x48f060], 1
call fcn.004476b0
mov eax, dword [0x48f060]
add esp, 8
test eax, eax
setg al
ret

Function at 0x43e540
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x2c8], 2
jne 0x43e595
mov eax, dword [0x48f060]
cmp eax, 0xffffffff
jne 0x43e58f
push 0
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
jne 0x43e575
xor eax, eax
test eax, eax
mov dword [0x48f060], eax
setg al
ret
push eax
push 0
mov dword [0x48f060], 1
call fcn.004476b0
mov eax, dword [0x48f060]
add esp, 8
test eax, eax
setg al
ret
mov al, 1
ret
Function at 0x446a00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x108
mov eax, dword [0x48f074]
xor eax, esp
mov dword [esp + 0x104], eax
push edi
mov edi, dword [esp + 0x110]
cmp byte [edi + 0x500], 0
jne 0x446a32
cmp dword [edi + 0x160], 0
je 0x446ae9
push esi
lea eax, [esp + 0x11c]
push eax
push dword [esp + 0x11c]
lea eax, [esp + 0x10]
push pe_nt_image_headers32
push eax
call fcn.00437000
lea esi, [esp + 0x18]
add esp, 0x10
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x446a60
sub esi, ecx
mov ecx, dword [edi + 0x160]
test ecx, ecx
je 0x446a95
cmp byte [edi + 0x48c0], al
jne 0x446a95
lea edx, [esp + 8]
nop
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x446a80
mov byte [edi + 0x48c0], 1
cmp byte [edi + 0x500], 0
je 0x446ae8
mov byte [esp + esi + 8], 0xa
inc esi
cmp esi, 0x102
jae 0x446b40
cmp dword [edi + 0x1d0], 0
mov byte [esp + esi + 8], 0
je 0x446aff
push 1
push edi
call fcn.00438770
push dword [edi + 0x15c]
lea eax, [esp + 0x14]
push esi
push eax
mov eax, dword [edi + 0x1d0]
push 0
push edi
call eax
push 0
push edi
call fcn.00438770
add esp, 0x24
pop esi
pop edi
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.0047497b
add esp, 0x108
ret
push dword [edi + 0x158]
push 1
push 2
push 0x47aec0
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [edi + 0x158]
lea eax, [esp + 0x1c]
push 1
push esi
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
mov ecx, dword [esp + 0x12c]
add esp, 0x20
pop esi
pop edi
xor ecx, esp
call fcn.0047497b
add esp, 0x108
ret
call fcn.00474b11
int3

Function at 0x446b50
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x808
mov eax, dword [0x48f074]
xor eax, esp
mov dword [esp + 0x804], eax
push edi
mov edi, dword [esp + 0x810]
test edi, edi
je 0x446c2e
cmp byte [edi + 0x500], 0
je 0x446c2e
push esi
lea eax, [esp + 0x81c]
push eax
push dword [esp + 0x81c]
lea eax, [esp + 0x10]
push 0x801
push eax
call fcn.00437000
lea esi, [esp + 0x18]
add esp, 0x10
lea ecx, [esi + 1]
nop word [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x446bb0
sub esi, ecx
cmp dword [edi + 0x1d0], 0
je 0x446c03
push 1
push edi
call fcn.00438770
push dword [edi + 0x15c]
lea eax, [esp + 0x14]
push esi
push eax
mov eax, dword [edi + 0x1d0]
push 0
push edi
call eax
push 0
push edi
call fcn.00438770
add esp, 0x24
pop esi
pop edi
mov ecx, dword [esp + 0x804]
xor ecx, esp
call fcn.0047497b
add esp, 0x808
ret
push dword [edi + 0x158]
push 1
push 2
push 0x47aec0
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [edi + 0x158]
lea eax, [esp + 0x1c]
push 1
push esi
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x20
pop esi
mov ecx, dword [esp + 0x808]
pop edi
xor ecx, esp
call fcn.0047497b
add esp, 0x808
ret
Function at 0x447250
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov edx, dword [esp + 8]
xor eax, eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
mov esi, 0x1cc
mov ecx, dword [edi + 0x1ac]
cmp edx, ecx
sete al
lea eax, [eax*4 + 0x1a8]
mov ebp, dword [eax + edi]
mov eax, 0x1dc
cmove esi, eax
mov eax, dword [edi + 0x2c0]
add esi, edi
mov ebx, dword [esi + 4]
sub ebx, dword [esi + 8]
test byte [eax + 0x40], 3
je 0x447328
xor eax, eax
cmp edx, ecx
sete al
lea eax, [eax*4 + 0x1bc]
cmp dword [eax + edi], 0x446df0
jne 0x447328
cmp dword [esi], 0
je 0x4472b8
test ebx, ebx
je 0x447328
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.004464e0
add esp, 0x14
cmp eax, 0xffffffff
je 0x447328
test al, 1
je 0x447328
mov ecx, dword [esi]
test ecx, ecx
jne 0x447308
mov eax, dword [edi]
mov eax, dword [eax + 0x4c0]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x48f040]
mov ebx, dword [esi + 4]
mov ecx, eax
add esp, 4
mov dword [esi], ecx
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
test ecx, ecx
je 0x447321
mov eax, dword [esi + 8]
push 0
push ebx
add eax, ecx
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x447328
add dword [esi + 8], eax
jmp 0x447328
mov dword [esi + 4], 0
push 0
push dword [esp + 0x24]
push dword [esp + 0x24]
push ebp
call dword [sym.imp.WS2_32.dll_send]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x447391
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x447362
mov ecx, dword [esp + 0x24]
lea eax, [ebx + 0x52]
pop edi
pop esi
pop ebp
mov dword [ecx], 0
pop ebx
ret
push esi
push edi
call fcn.00469ae0
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.00446a00
mov eax, dword [edi]
add esp, 0x14
mov ecx, dword [esp + 0x24]
pop edi
mov dword [eax + 0x48c4], esi
mov eax, 0x37
pop esi
pop ebp
mov dword [ecx], ebx
pop ebx
ret
mov ecx, dword [esp + 0x24]
xor eax, eax
pop edi
pop esi
pop ebp
mov dword [ecx], ebx
pop ebx
ret

Function at 0x447620
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
cmp dword [edi + 0x1d0], 0
je 0x447664
push esi
push 1
push edi
call fcn.00438770
push dword [edi + 0x15c]
mov eax, dword [edi + 0x1d0]
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
push edi
call eax
push 0
push edi
mov esi, eax
call fcn.00438770
add esp, 0x24
mov eax, esi
pop esi
pop edi
ret
mov eax, dword [esp + 0xc]
cmp eax, 2
ja 0x44769d
push dword [edi + 0x158]
lea eax, [eax + eax*2]
push 1
add eax, 0x47aec0
push 2
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
push dword [edi + 0x158]
push 1
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x20
xor eax, eax
pop edi
ret
Function at 0x447770
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 4]
cmp byte [eax + 0x1ec], 0
je 0x44778d
push eax
call fcn.004360e0
add esp, 4
test eax, eax
jne 0x4477ac
xor al, al
ret
mov eax, dword [eax + 0x1a8]
cmp eax, 0xffffffff
je 0x44778a
push 2
push 1
lea ecx, [esp + 0xc]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x44778a
mov al, 1
ret
Function at 0x44c1e0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x108
mov eax, dword [0x48f074]
xor eax, esp
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x10c]
push eax
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x44c245
push 0x104
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x44c245
lea eax, [esp]
push eax
call dword [0x48f04c]
add esp, 4
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.0047497b
add esp, 0x108
ret
mov ecx, dword [esp + 0x104]
xor eax, eax
xor ecx, esp
call fcn.0047497b
add esp, 0x108
ret
Function at 0x457820
Capabilities:
Resolve dns

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x1c]
push ebx
xor ebx, ebx
mov dword [esp + 4], ebx
mov dword [eax], ebx
lea eax, [esp + 8]
push eax
push dword [esp + 0x20]
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 0xc], eax
test eax, eax
jne 0x4579b2
push ebp
push edi
mov edi, dword [esp + 0x10]
test edi, edi
je 0x45799c
push esi
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x45786f
lea ebp, [eax + 0xe]
jmp 0x45787b
cmp eax, 0x17
jne 0x457929
lea ebp, [eax + 5]
cmp dword [edi + 0x18], 0
je 0x457929
mov eax, dword [edi + 0x10]
test eax, eax
je 0x457929
cmp eax, ebp
jb 0x457929
push 0x20
call dword [0x48f040]
mov esi, eax
add esp, 4
test esi, esi
je 0x457991
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 8]
mov dword [esi + 8], eax
mov eax, dword [edi + 0xc]
push ebp
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ebp
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x1c], 0
call dword [0x48f040]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x457980
push ebp
push dword [edi + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x457915
push eax
call dword [0x48f04c]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x457966
mov eax, dword [esp + 0x10]
test ebx, ebx
cmove ebx, esi
test eax, eax
je 0x457925
mov dword [eax + 0x1c], esi
mov dword [esp + 0x10], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x457862
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
pop esi
test eax, eax
je 0x457948
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebp, ebp
je 0x457998
push ebx
call fcn.004577e0
mov eax, dword [esp + 0x2c]
add esp, 4
xor ebx, ebx
mov dword [eax], ebx
mov eax, ebp
pop edi
pop ebp
pop ebx
add esp, 0xc
ret
push dword [esi + 0x18]
mov ebp, 8
call dword [0x48f044]
push esi
call dword [0x48f044]
add esp, 8
jmp 0x457938
push esi
mov ebp, 8
call dword [0x48f044]
add esp, 4
jmp 0x457938
mov ebp, 8
jmp 0x457938
test ebx, ebx
jne 0x4579a8
mov ebp, 0x2af9
push ebp
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
pop edi
mov dword [eax], ebx
mov eax, ebp
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x458310
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push str.kernel32
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x45832a
pop edi
pop ebx
pop ecx
ret
push ebp
push esi
push str.LoadLibraryExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [esp + 0x18]
mov ebp, eax
push 0x47e3b0
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_strpbrk
add esp, 8
test eax, eax
je 0x458372
test ebp, ebp
je 0x458363
push 8
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
test ebp, ebp
je 0x458398
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x458398
push 0x800
push 0
push esi
call ebp
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x45844f
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4583b5
sub ecx, ebx
lea eax, [edx + 1]
add eax, ecx
push eax
call dword [0x48f040]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x458445
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x458445
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4583e7
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x458400
sub ecx, edx
sub ecx, esi
add ecx, ebx
nop dword [eax]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x458410
test ebp, ebp
je 0x45843c
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x48f044]
add esp, 4
mov eax, edi
pop esi
pop ebp
pop edi
pop ebx
pop ecx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
push ebx
call dword [0x48f044]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
mov byte [esp + 0x16], al
lea eax, [esp + 0x14]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x1a8]
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x45970c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.00446a00
add esp, 0xc
push dword [esp + 0x18]
push ebx
push str.SENT
push dword [esi]
call fcn.004592d0
add esp, 0x10
pop edi
pop esi
pop ebx
ret
Function at 0x459840
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
cmp dword [esp + 0xc], 0x1f
mov eax, dword [esp + 8]
push ebp
mov eax, dword [eax]
mov dword [esp + 4], eax
mov ebp, dword [eax + 0x150]
jne 0x459991
push ebx
push esi
push edi
lea ebx, [ebp + 0x1cb0]
lea edi, [ebp + 0x1eb0]
mov dword [edi], ebx
cmp ebx, edi
jae 0x45987b
mov byte [ebx], 0xff
inc dword [edi]
mov eax, dword [edi]
jmp 0x45987d
mov eax, ebx
cmp eax, edi
jae 0x459891
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x459891
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebp + 0x1ca8]
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
movzx eax, ax
mov dword [esp + 0x1c], eax
movzx eax, word [ebp + 0x1caa]
push eax
call esi
mov edx, dword [esp + 0x1c]
movzx ecx, ax
mov eax, dword [edi]
cmp eax, edi
jae 0x4598fc
mov byte [eax], dl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4598fc
mov byte [eax], dh
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4598fc
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4598fc
shr ecx, 8
mov byte [eax], cl
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4598fc
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4598fc
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
mov esi, dword [esp + 0x10]
mov dword [ebp + 0x1eb4], eax
sub eax, ebx
sub eax, 2
mov dword [edi], ebx
push eax
lea eax, [ebp + 0x1cb2]
push eax
push 0x3e
push esi
call fcn.004593d0
add esp, 0x10
push 0
push 3
push ebx
mov ebx, dword [esp + 0x24]
push dword [ebx + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x459950
call edi
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00446a00
add esp, 0xc
push 4
lea eax, [ebp + 0x1cb3]
push eax
push ebx
call fcn.00459730
add esp, 0xc
lea eax, [ebp + 0x1cb7]
push 0
push 2
push eax
push dword [ebx + 0x1a8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x45998e
call edi
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00446a00
add esp, 0xc
pop edi
pop esi
pop ebx
pop ebp
pop ecx
ret
Function at 0x45ad70
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x88
mov eax, dword [0x48f074]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
mov ebx, dword [esp + 0x90]
lea eax, [esp + 4]
push ebp
push esi
push edi
mov esi, dword [ebx + 0x510]
mov edi, dword [ebx]
push eax
mov dword [esp + 0x14], 0x80
lea eax, [esp + 0x18]
push eax
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [esi + 0x15c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x45adf5
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
lea eax, [esi + 0xc8]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x45ae30
push str.Received_too_short_packet
push edi
call fcn.00446a00
add esp, 8
mov dword [esi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047497b
add esp, 0x88
ret
mov eax, dword [esi + 0x15c]
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 8
or ecx, eax
mov dword [esi + 0xc], ecx
add ecx, 0xfffffffd
cmp ecx, 3
ja case.default.0x45ae51
jmp dword [ecx*4 + 0x45af60]
cmp edx, 4
jle case.0x45ae51.4
mov ebp, dword [esi + 0x15c]
movzx ecx, byte [ebp + 2]
movzx eax, byte [ebp + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [esi + 0x40]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x45ae51.4
lea eax, [edx - 4]
push eax
lea eax, [ebp + 4]
push eax
push 1
push ebx
call fcn.004468e0
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x45aeaf
push 5
push esi
call fcn.0045b840
add esp, 8
mov eax, ebp
jmp 0x45ae17
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x90], eax
adc dword [edi + 0x94], edx
push dword [edi + 0x94]
push dword [edi + 0x90]
push edi
call fcn.0044c600
jmp 0x45af36
mov eax, dword [esi + 0x15c]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
mov eax, dword [esi + 0x15c]
add eax, 4
mov dword [esi + 8], ecx
push eax
push 0x4799e0
push edi
call fcn.00446b50
jmp 0x45af36
lea eax, [edx - 2]
push eax
mov eax, dword [esi + 0x15c]
add eax, 2
push eax
push esi
call fcn.0045ab00
add esp, 0xc
test eax, eax
je case.0x45ae51.4
jmp 0x45ae17
push str.Internal_error:_Unexpected_packet
push 0x47e924
push edi
call fcn.00446a00
add esp, 0xc
push ebx
call fcn.0044c9b0
add esp, 4
test eax, eax
je 0x45ae15
push 5
push esi
call fcn.0045b840
add esp, 8
mov eax, 0x2a
jmp 0x45ae17
Function at 0x4618c0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x88
mov eax, dword [0x48f074]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x9c]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0x80
push eax
mov ebp, dword [edi + 0x1ac]
or esi, 0xffffffff
mov ebx, dword [edi]
push ebp
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x461922
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
push ebp
push edi
call fcn.004476b0
add esp, 8
cmp esi, 0xffffffff
jne 0x461946
push str.Error_accept__ing_server_connect
push ebx
call fcn.00446a00
add esp, 8
mov eax, 0x1e
jmp 0x4619b5
push str.Connection_accepted_from_server_n
push ebx
call fcn.00446b50
push 1
mov byte [edi + 0x284], 0
push esi
mov dword [edi + 0x1ac], esi
call fcn.0046a3a0
add esp, 0x10
mov byte [edi + 0x1b9], 1
cmp dword [ebx + 0x1d8], 0
je 0x4619b3
push 1
push ebx
call fcn.00438770
mov eax, dword [ebx + 0x1d8]
push 1
push esi
push dword [ebx + 0x1dc]
call eax
push 0
push ebx
mov esi, eax
call fcn.00438770
add esp, 0x1c
test esi, esi
je 0x4619b3
push edi
call fcn.00461e60
add esp, 4
mov eax, 0x2a
jmp 0x4619b5
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047497b
add esp, 0x88
ret