joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a75a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
mov dword [ebp - 4], ecx
mov eax, dword [edi]
test eax, eax
je 0x4a75ee
add eax, 0xfffffff8
cmp dword [eax], 0xf4b78c3
jne 0x4a7646
cmp dword [eax + 4], 0
jl 0x4a7646
push eax
mov dword [eax], 0
mov eax, dword [0x7cc6bc]
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x4a75e5
int3
mov ecx, dword [ebp - 4]
mov dword [edi], 0
mov esi, ebx
shr ebx, 4
push 6
inc ebx
and esi, 0xf
movzx eax, bx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4a769b
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, eax
test ecx, ecx
je 0x4a769b
test esi, esi
je 0x4a7635
movzx eax, word [ecx]
lea ecx, [ecx + eax*2]
add ecx, 2
sub esi, 1
jne 0x4a7627
movzx esi, word [ecx]
test esi, esi
jne 0x4a7649
pop edi
lea eax, [esi + 1]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
int3
mov eax, dword [edi]
lea ebx, [ecx + 2]
test eax, eax
je 0x4a7687
add eax, 0xfffffff8
cmp dword [eax], 0xf4b78c3
jne 0x4a7680
cmp dword [eax + 4], 0
jl 0x4a7680
push eax
mov dword [eax], 0
mov eax, dword [0x7cc6bc]
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jne 0x4a7681
int3
int3
mov dword [edi], 0
mov edx, esi
mov ecx, ebx
call fcn.0048d150
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4a76b6
jle 0x4a76bb
pop edi
movzx eax, ax
pop esi
or eax, 0x80070000
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4aee40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x814
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
test esi, esi
je 0x4aeefb
cmp byte [esi + 0x370], 0
je 0x4aeefb
lea eax, [ebp + 0x10]
mov edx, 0x801
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 0x810]
call fcn.004ba620
lea eax, [ebp - 0x810]
push eax
call fcn.006e5360
mov edi, dword [esi + 0x1b0]
add esp, 0xc
mov ebx, eax
test edi, edi
je 0x4aeecf
push dword [esi + 0x13c]
lea eax, [ebp - 0x810]
mov ecx, edi
push ebx
push eax
push 0
push esi
call dword [0x70d440]
call edi
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push dword [esi + 0x138]
push 1
push 2
push 0x78426c
call fcn.006e5043
push dword [esi + 0x138]
lea eax, [ebp - 0x810]
push 1
push ebx
push eax
call fcn.006e5043
add esp, 0x20
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret
Function at 0x4aef10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x110]
mov dword [ebp - 0x11c], eax
lea ecx, [ebp - 0x11c]
push edi
lea eax, [ebp + 0x10]
mov dword [ebp - 0x118], 0
push eax
push dword [ebp + 0xc]
mov edx, 0x4ba5f0
mov dword [ebp - 0x114], 0x100
call fcn.004b9a10
add esp, 8
cmp eax, 0xffffffff
je 0x4aef89
mov eax, dword [ebp - 0x114]
test eax, eax
je 0x4aef89
cmp eax, dword [ebp - 0x118]
mov eax, dword [ebp - 0x11c]
jne 0x4aef86
mov byte [eax - 1], 0
jmp 0x4aef89
mov byte [eax], 0
lea eax, [ebp - 0x110]
push eax
call fcn.006e5360
mov edi, eax
add esp, 4
mov eax, dword [esi + 0x140]
test eax, eax
je 0x4aefc4
cmp byte [esi + 0x46b0], 0
jne 0x4aefc4
lea ecx, [ebp - 0x110]
push ecx
push eax
call fcn.006e6d10
add esp, 8
mov byte [esi + 0x46b0], 1
cmp byte [esi + 0x370], 0
je 0x4af00e
mov byte [ebp + edi - 0x110], 0xa
inc edi
cmp edi, 0x102
jae 0x4af05c
mov ebx, dword [esi + 0x1b0]
mov byte [ebp + edi - 0x110], 0
test ebx, ebx
je 0x4af01f
push dword [esi + 0x13c]
lea eax, [ebp - 0x110]
mov ecx, ebx
push edi
push eax
push 0
push esi
call dword [0x70d440]
call ebx
add esp, 0x14
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push dword [esi + 0x138]
push 1
push 2
push 0x78426c
call fcn.006e5043
push dword [esi + 0x138]
lea eax, [ebp - 0x110]
push 1
push edi
push eax
call fcn.006e5043
mov ecx, dword [ebp - 4]
add esp, 0x20
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret
call fcn.006d0efb
int3
Function at 0x4af280
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + ecx*4 + 0x198]
lea esi, [edi + 0x1bc]
mov dword [esp + 0xc], eax
mov eax, ecx
shl eax, 4
add esi, eax
mov eax, dword [edi + 0x2c8]
mov ebx, dword [esi + 4]
sub ebx, dword [esi + 8]
test byte [eax + 0x3c], 3
je 0x4af34a
cmp dword [edi + ecx*4 + 0x1ac], 0x4af3f0
jne 0x4af34a
cmp dword [esi], 0
je 0x4af2d4
test ebx, ebx
je 0x4af34a
mov ecx, dword [esp + 0xc]
or edx, 0xffffffff
push 0
push 0
push 0xffffffffffffffff
call fcn.004b1160
add esp, 0xc
cmp eax, 0xffffffff
je 0x4af34a
test al, 1
je 0x4af34a
mov ecx, dword [esi]
test ecx, ecx
jne 0x4af327
mov eax, dword [edi]
mov eax, dword [eax + 0x32c]
add eax, eax
push eax
mov dword [esi + 4], eax
call fcn.006d77d0
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 0x4af343
mov eax, dword [esi + 8]
push 0
push ebx
add eax, ecx
push eax
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x4af34a
add dword [esi + 8], eax
jmp 0x4af34a
mov dword [esi + 4], 0
push 0
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [ebp + 0x18]
mov esi, eax
mov dword [ebx], 0
cmp esi, 0xffffffff
jne 0x4af3b7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0xc], eax
cmp eax, 0x2733
jne 0x4af38c
mov dword [ebx], 0x51
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, eax
mov ecx, edi
call fcn.004bafa0
push eax
push str.Send_failure:__s
push dword [edi]
call fcn.004aef10
mov eax, dword [edi]
add esp, 0xc
mov ecx, dword [esp + 0xc]
mov dword [eax + 0x46b4], ecx
mov dword [ebx], 0x37
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4af8e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push edi
mov edi, dword [esi + 0x1b0]
test edi, edi
je 0x4af910
push dword [esi + 0x13c]
mov ecx, edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push edx
push esi
call dword [0x70d440]
call edi
add esp, 0x14
pop edi
pop esi
pop ebp
ret
cmp edx, 2
ja 0x4af944
push dword [esi + 0x138]
lea eax, [edx*2 + 0x78426c]
push 1
add eax, edx
push 2
push eax
call fcn.006e5043
push dword [esi + 0x138]
push 1
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.006e5043
add esp, 0x20
pop edi
xor eax, eax
pop esi
pop ebp
ret
Function at 0x4b00a0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov esi, edx
cmp dword [edi + 0x94], 2
mov ebx, dword [edi]
je 0x4b025d
cmp byte [edi + 0x28e], 0
jne 0x4b0256
cmp byte [edi + 0x2aa], 0
jne 0x4b0256
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0x80
push eax
lea eax, [ebp - 0x108]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4b0138
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.004bafa0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.004aef10
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x88]
mov dword [ebp - 0x10c], 0x80
push 0
push eax
call fcn.006d4310
add esp, 0xc
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x88]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4b01a3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.004bafa0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.004aef10
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
lea eax, [edi + 0x138]
lea esi, [edi + 0x10a]
push eax
mov edx, esi
lea ecx, [ebp - 0x108]
call fcn.004b0040
add esp, 4
test al, al
jne 0x4b01f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.004bafa0
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.004aef10
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push 0x2e
lea eax, [edi + 0x60]
push esi
push eax
call fcn.006d2cf0
add esp, 0xc
lea eax, [edi + 0x16c]
lea edx, [edi + 0x13c]
lea ecx, [ebp - 0x88]
push eax
call fcn.004b0040
add esp, 4
test al, al
jne 0x4b0256
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.004bafa0
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.004aef10
add esp, 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov ecx, edi
call fcn.004affc0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret
Function at 0x4b0880
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x7ccc34]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
push esi
mov esi, ecx
test eax, eax
jne 0x4b08d1
lea edx, [eax + 3]
lea ecx, [eax + 6]
call fcn.004b9020
test al, al
je 0x4b08c5
mov dword [0x7ccc34], 2
pop esi
mov esp, ebp
pop ebp
ret
mov dword [0x7ccc34], 1
jmp 0x4b08d6
cmp eax, 2
je 0x4b0912
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4b08fb
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x4b0912
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4b9150
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push str.kernel32
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 4], eax
test eax, eax
jne 0x4b9177
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
push 0x794898
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x7948a8
push esi
mov edi, eax
call fcn.006ec271
add esp, 8
test eax, eax
je 0x4b91c4
test edi, edi
je 0x4b91b4
push 8
push 0
push esi
mov ecx, edi
call dword [0x70d440]
call edi
pop edi
mov ebx, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop edi
mov ebx, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4b91f5
push str.AddDllDirectory
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4b91f5
push 0x800
push 0
push esi
mov ecx, edi
call dword [0x70d440]
call edi
pop edi
mov ebx, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov dword [ebp - 4], eax
test eax, eax
je 0x4b929c
push esi
call fcn.006e5360
mov ecx, dword [ebp - 4]
inc ecx
add ecx, eax
push ecx
call fcn.006d77d0
mov esi, eax
add esp, 8
test esi, esi
je 0x4b9293
push dword [ebp - 4]
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4b9293
push 0x7948c8
push esi
call fcn.006e5360
add esp, 4
add eax, esi
push eax
call fcn.006e6d10
add esp, 8
push dword [ebp - 8]
push esi
call fcn.006e5360
add esp, 4
add eax, esi
push eax
call fcn.006e6d10
add esp, 8
test edi, edi
je 0x4b928a
push 8
push 0
push esi
mov ecx, edi
call dword [0x70d440]
call edi
push esi
mov ebx, eax
call fcn.006d6340
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push esi
call fcn.006d6340
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4bb940
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0xc]
push esi
xor esi, esi
mov dword [ebp - 8], esi
mov dword [eax], esi
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 4], eax
test eax, eax
jne 0x4bbae7
push edi
mov edi, dword [ebp - 0xc]
test edi, edi
je 0x4bbad3
push ebx
nop dword [eax + eax]
cmp dword [edi + 4], 2
jne 0x4bba3a
cmp dword [edi + 0x18], 0
je 0x4bba3a
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4bba3a
cmp eax, 0x10
jb 0x4bba3a
push 0x20
call fcn.006d77d0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4bbac2
mov ecx, dword [edi]
mov dword [ebx], ecx
mov ecx, dword [edi + 4]
mov dword [ebx + 4], ecx
mov ecx, dword [edi + 8]
mov dword [ebx + 8], ecx
mov eax, dword [edi + 0xc]
push 0x10
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], 0x10
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x1c], 0
call fcn.006d77d0
add esp, 4
mov dword [ebx + 0x18], eax
test eax, eax
je 0x4bbaaf
push 0x10
push dword [edi + 0x18]
push eax
call fcn.006d2cf0
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x4bba28
push eax
call fcn.006eef70
add esp, 4
mov dword [ebx + 0x14], eax
test eax, eax
je 0x4bba94
mov eax, dword [ebp - 8]
test esi, esi
cmove esi, ebx
test eax, eax
je 0x4bba37
mov dword [eax + 0x1c], ebx
mov dword [ebp - 8], ebx
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x4bb980
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
pop ebx
test eax, eax
je 0x4bba57
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test edi, edi
je 0x4bbacf
test esi, esi
je 0x4bba85
nop
push dword [esi + 0x18]
call fcn.006d6340
push dword [esi + 0x14]
call fcn.006d6340
mov edi, dword [esi + 0x1c]
push esi
call fcn.006d6340
add esp, 0xc
mov esi, edi
test edi, edi
jne 0x4bba60
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
xor esi, esi
mov dword [eax], esi
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push dword [ebx + 0x18]
mov edi, 8
mov dword [ebp - 4], edi
call fcn.006d6340
push ebx
call fcn.006d6340
add esp, 8
jmp 0x4bba48
mov edi, 8
push ebx
mov dword [ebp - 4], edi
call fcn.006d6340
add esp, 4
jmp 0x4bba48
mov edi, 8
mov dword [ebp - 4], edi
jmp 0x4bba48
test esi, esi
jne 0x4bbadf
mov edi, 0x2af9
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4be5e0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, ecx
mov ecx, dword [ebp + 0x10]
push esi
xor esi, esi
mov dword [ebp - 0x18], edx
push edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], esi
mov dword [ecx], esi
nop
mov esi, dword [eax]
xor eax, eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0x493e0
mov dword [ebp - 8], 0
mov ecx, dword [esi + 0x1e8]
test ecx, ecx
mov edx, dword [esi + 0x1ec]
setg al
test edx, edx
jle 0x4be62d
or eax, 2
sub eax, 1
je 0x4be645
sub eax, 1
je 0x4be708
sub eax, 1
jne 0x4be64e
cmp ecx, edx
cmovge ecx, edx
mov eax, ecx
cdq
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
mov eax, 0x10624dd3
mul ecx
push 0
mov edi, edx
shr edi, 6
imul eax, edi, 0x3e8
push 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
sub eax, dword [esi + 0x5a4]
cdq
push edx
push eax
call fcn.00702460
mov ecx, eax
mov esi, edx
mov eax, dword [ebp - 0x14]
sub edi, dword [eax + 0x5a0]
imul eax, edi, 0x3e8
cdq
mov edi, eax
neg edi
adc edx, 0
neg edx
sub edi, ecx
sbb edx, esi
add edi, dword [ebp - 4]
mov eax, edi
adc edx, dword [ebp - 8]
or eax, edx
je 0x4be750
test edx, edx
jl 0x4be750
jg 0x4be6c8
test edi, edi
jb 0x4be750
push edx
push edi
mov edi, dword [ebp - 0x18]
or edx, 0xffffffff
push 0xffffffffffffffff
mov ecx, edi
call fcn.004b1160
add esp, 0xc
test eax, eax
jle 0x4be746
mov esi, dword [ebp + 8]
push 0
push ebx
push esi
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4be70f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4be729
mov eax, dword [ebp - 0x10]
jmp 0x4be600
mov eax, edx
jmp 0x4be647
cmp ebx, eax
je 0x4be735
test eax, eax
je 0x4be746
add esi, eax
sub ebx, eax
add dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp + 8], esi
jmp 0x4be600
mov eax, 0x38
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
add eax, dword [ebp - 0xc]
mov dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0x1c
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c19a0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov eax, ecx
mov dword [ebp - 0x8c], 0x80
push edi
mov dword [ebp - 0x90], eax
mov esi, dword [eax + 0x510]
mov edi, dword [eax]
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x88]
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 0x4c1a30
push dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.006d2cf0
mov eax, dword [ebp - 0x8c]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x4c1a63
push str.Received_too_short_packet
push edi
call fcn.004aef10
add esp, 8
mov dword [esi + 0xc], 7
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
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.0x4c1a84
jmp dword [ecx*4 + 0x4c1bc8]
cmp edx, 4
jle case.0x4c1a84.4
mov ebx, dword [esi + 0x15c]
movzx ecx, byte [ebx + 2]
movzx eax, byte [ebx + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [esi + 0x40]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x4c1a84.4
mov ecx, dword [ebp - 0x90]
lea eax, [edx - 4]
push eax
lea eax, [ebx + 4]
mov edx, 1
push eax
call fcn.004af7a0
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4c1af7
mov edx, 5
mov ecx, esi
call fcn.004c16f0
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14c]
mov ecx, edi
sub eax, 4
cdq
add dword [edi + 0x90], eax
adc dword [edi + 0x94], edx
push dword [edi + 0x94]
push dword [edi + 0x90]
call fcn.004b46d0
add esp, 8
jmp case.0x4c1a84.4
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 0x793c44
push edi
call fcn.004aee40
jmp 0x4c1b8e
lea eax, [edx - 2]
mov ecx, esi
mov edx, dword [esi + 0x15c]
push eax
add edx, 2
call fcn.004c0840
add esp, 4
test eax, eax
je case.0x4c1a84.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x7964ec
push edi
call fcn.004aef10
add esp, 0xc
mov ecx, dword [ebp - 0x90]
call fcn.004b48d0
test eax, eax
je 0x4c1a50
mov edx, 5
mov ecx, esi
call fcn.004c16f0
mov ecx, dword [ebp - 4]
mov eax, 0x2a
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret
Function at 0x4c33d0
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x7c0ab4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x1c], 0x10
push edi
lea ecx, [ebp - 0x1c]
or edi, 0xffffffff
push ecx
mov eax, dword [esi + 0x19c]
lea ecx, [ebp - 0x14]
mov ebx, dword [esi]
push ecx
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4c3427
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
mov edx, dword [ebp - 0x18]
mov ecx, esi
call fcn.004b0f90
cmp edi, 0xffffffff
jne 0x4c345a
push str.Error_accept__ing_server_connect
push ebx
call fcn.004aef10
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server_n
push ebx
call fcn.004aee40
add esp, 8
mov byte [esi + 0x298], 0
lea eax, [ebp - 0x18]
mov dword [esi + 0x19c], edi
mov dword [ebp - 0x18], 1
push eax
push 0x8004667e
push edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov byte [esi + 0x1a9], 1
mov eax, dword [ebx + 0x1b8]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x4c34d8
push 1
push edi
push dword [ebx + 0x1bc]
mov ecx, eax
call dword [0x70d440]
call dword [ebp - 0x18]
add esp, 0xc
test eax, eax
je 0x4c34d8
mov ecx, esi
call fcn.004c3320
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006d0856
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006d0856
mov esp, ebp
pop ebp
ret