joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4969df
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.004871a0
and dword [ebp - 4], 0
cmp dword [0x5be65c], 0
mov ebx, eax
jne 0x496a90
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x496b41
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x496b41
push eax
call fcn.0048712e
mov dword [esp], 0x57f840
push edi
mov dword [0x5be65c], eax
call esi
push eax
call fcn.0048712e
mov dword [esp], 0x57f82c
push edi
mov dword [0x5be660], eax
call esi
push eax
call fcn.0048712e
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x5be664], eax
call esi
push eax
call fcn.0048712e
pop ecx
mov dword [0x5be66c], eax
test eax, eax
je 0x496a90
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0048712e
pop ecx
mov dword [0x5be668], eax
mov eax, dword [0x5be668]
cmp eax, ebx
je 0x496ae8
cmp dword [0x5be66c], ebx
je 0x496ae8
push eax
call fcn.004871a9
push dword [0x5be66c]
mov esi, eax
call fcn.004871a9
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x496ae8
test edi, edi
je 0x496ae8
call esi
test eax, eax
je 0x496adf
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x496adf
test byte [ebp - 0xc], 1
jne 0x496ae8
or dword [ebp + 0x10], 0x200000
jmp 0x496b21
mov eax, dword [0x5be660]
cmp eax, ebx
je 0x496b21
push eax
call fcn.004871a9
pop ecx
test eax, eax
je 0x496b21
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x496b21
mov eax, dword [0x5be664]
cmp eax, ebx
je 0x496b21
push eax
call fcn.004871a9
pop ecx
test eax, eax
je 0x496b21
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x5be65c]
call fcn.004871a9
pop ecx
test eax, eax
je 0x496b41
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x496b43
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x49fb00
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x564663
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
mov eax, dword [0x5b2ee4]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0xc], esi
xor ebx, ebx
or eax, 0xffffffff
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], ebx
mov dword [esi + 0x20], 0x5be924
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
lea ecx, [esi + 0x34]
mov dword [esi], vtable.TiXmlDocument.0
mov dword [esp + 0x18], ebx
mov dword [ecx], 0x5be924
mov dword [esi + 0x40], eax
mov dword [esi + 0x3c], eax
push ebx
push 0x57a3f0
mov byte [esp + 0x20], 1
mov dword [esi + 0x38], 4
mov byte [esi + 0x44], bl
mov byte [esi + 0x2c], bl
mov dword [esi + 0x30], ebx
call fcn.004a2dd0
mov dword [esi + 0x40], ebx
mov dword [esi + 0x3c], ebx
mov eax, esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x10
ret
Function at 0x49fbb0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x564888
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5b2ee4]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov ebx, ecx
mov ebp, dword [esp + 0x28]
xor edi, edi
cmp ebp, edi
jne 0x49fbf2
push edi
push edi
push edi
push 2
call fcn.004a1410
xor al, al
jmp 0x49fd8f
mov esi, dword [ebx + 0x18]
cmp esi, edi
je 0x49fc11
lea esp, [esp]
mov ecx, esi
mov eax, dword [ecx]
mov edx, dword [eax]
mov esi, dword [esi + 0x28]
push 1
call edx
cmp esi, edi
jne 0x49fc00
push 2
or eax, 0xffffffff
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x1c], edi
push edi
push ebp
mov dword [ebx + 8], eax
mov dword [ebx + 4], eax
call fcn.004819cb
push ebp
call fcn.00491b71
push 0
push 0
push ebp
mov edi, eax
call fcn.004819cb
add esp, 0x1c
test edi, edi
jne 0x49fc55
push edi
push edi
push edi
push 0xd
mov ecx, ebx
call fcn.004a1410
xor al, al
jmp 0x49fd8f
mov dword [esp + 0x14], 0x5be924
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x24], 0
call fcn.004a2d30
lea eax, [edi + 1]
push eax
call fcn.004617c5
push ebp
mov esi, eax
push 1
push edi
push esi
mov dword [esp + 0x3c], esi
mov byte [esi], 0
call fcn.004cda1e
add esp, 0x14
cmp eax, 1
je 0x49fcc5
push 0
push 0
push 0
push 2
mov ecx, ebx
call fcn.004a1410
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
cmp eax, 0x5be924
je 0x49fcbe
push eax
call fcn.004617f4
add esp, 4
xor al, al
jmp 0x49fd8f
mov ebp, dword [esp + 0x28]
mov byte [edi + ebp], 0
cmp byte [ebp], 0
mov eax, esi
je 0x49fd37
mov cl, byte [esi]
cmp cl, 0xa
jne 0x49fcf5
mov ecx, esi
sub ecx, eax
add ecx, 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.004a2ec0
add esi, 1
mov eax, esi
jmp 0x49fd32
cmp cl, 0xd
jne 0x49fd2f
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x49fd0d
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.004a2ec0
push 1
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x30], 0xa
call fcn.004a2ec0
cmp byte [esi + 1], 0xa
jne 0x49fcee
add esi, 2
mov eax, esi
jmp 0x49fd32
add esi, 1
cmp byte [esi], 0
jne 0x49fcd5
sub esi, eax
je 0x49fd46
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.004a2ec0
push ebp
call fcn.004617f4
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
mov eax, dword [ebx]
mov eax, dword [eax + 8]
add esp, 4
push ecx
push 0
add edx, 8
push edx
mov ecx, ebx
call eax
cmp byte [ebx + 0x2c], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
jne 0x49fcae
cmp eax, 0x5be924
je 0x49fd8d
push eax
call fcn.004617f4
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
Function at 0x4a4660
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x5b2ee4]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x4a46b0
mov ax, word [esp]
cmp al, 2
jne 0x4a46aa
cmp ah, al
jne 0x4a46aa
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.0047e001
add esp, 0x194
ret
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.0047e001
add esp, 0x194
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_recv]
cmp eax, 0xffffffff
jne 0x4b0142
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x4b0290
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4b02ab
mov edx, dword [esi + 0xf4]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4b02df
cmp eax, 2
jg 0x4b02df
mov ecx, dword [esi + 0xf0]
push ecx
push 1
lea edx, [eax + eax*2 + 0x582598]
push 2
push edx
call fcn.004815ea
mov eax, dword [esi + 0xf0]
push eax
push 1
push edi
push ebx
call fcn.004815ea
add esp, 0x20
xor eax, eax
ret

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

Disassembly:
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + eax*4 + 0x130]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WSOCK32.dll_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebx], 0
jne 0x4b066d
push ebp
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x4b0644
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.004b44f0
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.004b0470
mov ecx, dword [esi]
add esp, 0x14
mov dword [ecx + 0x856c], ebp
mov dword [ebx], 0x37
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4b0e30
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10c
mov eax, dword [0x5b2ee4]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push ebp
mov ebp, dword [esp + 0x118]
cmp dword [ebp + 0x19c], 0
push esi
push edi
mov edi, dword [ebp]
mov dword [esp + 0x14], edi
jne 0x4b0f6b
mov esi, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WSOCK32.dll_getpeername]
test eax, eax
je 0x4b0eac
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.004b44f0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.004b0470
add esp, 0x18
jmp 0x4b0f74
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x9c]
push eax
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
je 0x4b0eec
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.004b44f0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.004b0470
add esp, 0x18
jmp 0x4b0f74
lea ebx, [ebp + 0xcc]
lea edi, [ebp + 0x9e]
lea esi, [esp + 0x18]
call fcn.004b0df0
test eax, eax
jne 0x4b0f2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004b44f0
mov ecx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.004b0470
add esp, 0x18
jmp 0x4b0f74
lea ebx, [ebp + 0x100]
lea edi, [ebp + 0xd0]
lea esi, [esp + 0x98]
call fcn.004b0df0
test eax, eax
jne 0x4b0f6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004b44f0
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.004b0470
add esp, 0x18
jmp 0x4b0f74
push ebp
call fcn.004b0d90
add esp, 4
mov ecx, dword [esp + 0x118]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047e001
add esp, 0x10c
ret

Function at 0x4b0f90
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x314]
push 4
lea ecx, [esp + 8]
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4b0fd3
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push edi
call fcn.004b44f0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004b03e0
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004b03e0
add esp, 8
pop esi
pop ecx
ret

Function at 0x4b0ff0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push 0x1001
push 0xffff
push esi
mov dword [esp + 0x1c], 0x4020
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4b1039
mov edx, dword [esp + 4]
cmp edx, dword [esp + 8]
jg 0x4b1051
push 4
lea eax, [esp + 0xc]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret
Function at 0x4b1060
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [ecx + 0x530]
cmp eax, 0xffffffff
je 0x4b10b9
mov ecx, dword [ecx + 0x524]
mov edx, dword [ecx]
cmp dword [edx + eax*4], 0
lea eax, [edx + eax*4]
je 0x4b10b9
mov ecx, dword [esp + 8]
test ecx, ecx
mov eax, dword [eax]
je 0x4b108c
mov dword [ecx], eax
cmp dword [eax + 0x148], 0
push esi
mov esi, dword [eax + 0x130]
jne 0x4b10b0
push 2
push 1
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.WSOCK32.dll_recv]
test eax, eax
jne 0x4b10b5
or eax, 0xffffffff
pop esi
ret
mov eax, esi
pop esi
ret
or eax, 0xffffffff
ret
Function at 0x4b2a40
Capabilities:
Set socket configuration

Disassembly:
push esi
mov esi, dword [esp + 8]
mov al, byte [esi]
xor edx, edx
test al, al
mov ecx, esi
je 0x4b2a66
nop
cmp al, 0x2e
jne 0x4b2a57
add edx, 1
mov al, byte [ecx + 1]
add ecx, 1
test al, al
jne 0x4b2a50
cmp edx, 3
je 0x4b2a6c
xor eax, eax
pop esi
ret 8
push esi
call dword [sym.imp.WSOCK32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x4b2a66
mov ecx, dword [esp + 0xc]
mov dword [ecx], eax
mov eax, 1
pop esi
ret 8

Function at 0x4b2b00
Capabilities:
Resolve dns

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x1c]
mov dword [esi], 0
push ecx
mov byte [eax], 0
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ecx, eax
test ecx, ecx
mov dword [esp + 0x1c], ecx
je 0x4b2ba4
cmp word [ecx + 8], 2
push ebx
push ebp
push edi
jne 0x4b2b75
cmp word [ecx + 0xa], 4
jne 0x4b2b75
mov edi, dword [ecx + 0xc]
mov eax, dword [edi]
test eax, eax
je 0x4b2b75
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
lea esp, [esp]
mov edx, dword [eax]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebx
push ebp
call fcn.004b2a90
test eax, eax
mov dword [esi], eax
je 0x4b2b98
add edi, 4
lea esi, [eax + 0x1c]
mov eax, dword [edi]
test eax, eax
jne 0x4b2b50
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
mov edx, dword [esp + 0x24]
push 0x400
push ecx
push 0x401
push edx
call fcn.00494677
add esp, 0x10
pop edi
pop ebp
pop ebx
xor eax, eax
pop esi
ret 0x18
pop edi
pop ebp
pop ebx
mov eax, 8
pop esi
ret 0x18
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
add eax, 0xffffd507
cmp eax, 3
ja case.0x4b2bb4.11001
jmp dword [eax*4 + 0x4b2bd8]
mov eax, 0x2af9
pop esi
ret 0x18
mov eax, 0x2afa
pop esi
ret 0x18
mov eax, 0x2afb
pop esi
ret 0x18
Function at 0x4b3410
Capabilities:
Get common file path

Disassembly:
sub esp, 0x230
mov eax, dword [0x5b2ee4]
xor eax, esp
mov dword [esp + 0x22c], eax
cmp dword [0x5be964], 0
mov dword [esp], str.getaddrinfo
mov dword [esp + 4], 0x4b2e60
mov dword [esp + 8], str.getnameinfo
mov dword [esp + 0xc], 0x4b3150
mov dword [esp + 0x10], str.freeaddrinfo
mov dword [esp + 0x14], fcn.004b2e10
je 0x4b3482
movzx eax, word [esp + 0x234]
mov eax, dword [eax*8 + 0x5b45b8]
mov ecx, dword [esp + 0x22c]
xor ecx, esp
call fcn.0047e001
add esp, 0x230
ret 4
push 0x104
lea ecx, [esp + 0x128]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4b357f
push ebx
push ebp
push esi
push edi
lea edx, [esp + 0x134]
push edx
lea eax, [esp + 0x2c]
push 0x10c
push eax
call fcn.00489e90
push str.ws2_32
lea ecx, [esp + 0x38]
push 0x10c
push ecx
call fcn.00494603
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
add esp, 0x18
lea edx, [esp + 0x28]
push edx
call edi
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x4b34fd
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x4b3544
push esi
call ebp
lea eax, [esp + 0x134]
push eax
lea ecx, [esp + 0x2c]
push 0x10c
push ecx
call fcn.00489e90
push str.wship6
lea edx, [esp + 0x38]
push 0x10c
push edx
call fcn.00494603
add esp, 0x18
lea eax, [esp + 0x28]
push eax
call edi
mov esi, eax
test esi, esi
je 0x4b357b
push str.getaddrinfo
push esi
call ebx
test eax, eax
je 0x4b35af
xor edi, edi
mov ecx, dword [esp + edi*8 + 0x10]
push ecx
push esi
call ebx
test eax, eax
mov dword [esp + edi*8 + 0x14], eax
je 0x4b35af
add edi, 1
cmp edi, 3
jl 0x4b3546
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov dword [0x5b45b8], edx
mov dword [0x5b45c0], eax
mov dword [fcn.004b2e10], ecx
pop edi
pop esi
pop ebp
pop ebx
movzx edx, word [esp + 0x234]
mov ecx, dword [esp + 0x22c]
mov eax, dword [edx*8 + 0x5b45b8]
xor ecx, esp
mov dword [0x5be964], 1
call fcn.0047e001
add esp, 0x230
ret 4
push esi
call ebp
jmp 0x4b357b

Function at 0x4b3b10
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
push 0
push 0
push eax
push ecx
push 0
push 0
call fcn.00485b04
add esp, 0x18
test eax, eax
je 0x4b3b33
cmp eax, 0xffffffff
jne 0x4b3b35
xor eax, eax
ret
Function at 0x4ba340
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
push str.Connected_for_receive
push 0x5824e0
push ecx
call fcn.004b03e0
add esp, 0xc
mov eax, esi
mov dword [esi], 1
call fcn.004b94e0
test eax, eax
jne 0x4ba370
mov eax, esi
jmp fcn.004b9970
ret
Function at 0x4ba780
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x88
mov eax, dword [0x5b2ee4]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
mov ebp, dword [esp + 0x94]
mov ebx, dword [ebp]
push esi
mov esi, dword [ebp + 0x3d0]
push edi
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0x80
mov edx, dword [esi + 0x154]
mov eax, dword [esi + 0x15c]
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esi + 0x14]
push 0
add edx, 4
lea edi, [esi + 0x15c]
push edx
push eax
push ecx
call dword [sym.imp.WSOCK32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x4ba80f
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esi + 0xc8]
push ecx
call fcn.0047f490
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [esi + 0x148], edx
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x4ba84a
push str.Received_too_short_packet
push ebx
call fcn.004b0470
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.0047e001
add esp, 0x88
ret
mov eax, edi
call fcn.004b9660
movzx eax, ax
mov dword [esi + 0xc], eax
add eax, 0xfffffffd
cmp eax, 3
ja case.default.0x4ba863
jmp dword [eax*4 + 0x4ba950]
cmp edx, 4
jle case.0x4ba863.4
mov eax, edi
call fcn.004b9670
movzx ecx, word [esi + 0x40]
add ecx, 1
cmp cx, ax
jne case.0x4ba863.4
add edx, 0xfffffffc
push edx
mov edx, dword [edi]
add edx, 4
push edx
push 1
push ebp
call fcn.004b0750
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4ba8b8
mov ecx, 5
mov eax, esi
call fcn.004ba700
mov eax, edi
jmp 0x4ba831
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [ebx + 0x38], eax
mov ecx, dword [ebx + 0x38]
adc dword [ebx + 0x3c], edx
mov eax, dword [ebx + 0x3c]
push eax
push ecx
push ebx
call fcn.004c7320
jmp 0x4ba924
mov eax, edi
call fcn.004b9670
movzx edx, ax
mov eax, dword [edi]
add eax, 4
push eax
push 0x5824e0
push ebx
mov dword [esi + 8], edx
call fcn.004b03e0
jmp 0x4ba924
mov ecx, dword [edi]
add edx, 0xfffffffe
push edx
add ecx, 2
push ecx
push esi
call fcn.004b9710
add esp, 0xc
test eax, eax
je case.0x4ba863.4
jmp 0x4ba831
push str.Internal_error:_Unexpected_packet
push 0x580a6c
push ebx
call fcn.004b0470
add esp, 0xc
push ebp
call fcn.004c73e0
add esp, 4
test eax, eax
je 0x4ba82f
mov ecx, 5
mov eax, esi
call fcn.004ba700
mov eax, 0x2a
jmp 0x4ba831

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

Disassembly:
push ecx
mov edx, dword [edi + 0x130]
mov al, byte [esp + 8]
push esi
mov esi, dword [edi]
push 0
push 3
lea ecx, [esp + 0xc]
push ecx
push edx
mov byte [esp + 0x14], 0xff
mov byte [esp + 0x15], al
mov byte [esp + 0x16], bl
call dword [sym.imp.WSOCK32.dll_send]
test eax, eax
jge 0x4bc704
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004b0470
add esp, 0xc
mov esi, dword [esp + 0xc]
mov ecx, dword [edi]
push str.SENT
mov eax, ebx
call fcn.004bc5b0
add esp, 4
pop esi
pop ecx
ret
Function at 0x4bdd50
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x18
mov eax, dword [0x5b2ee4]
xor eax, esp
mov dword [esp + 0x14], eax
push ebx
mov ebx, dword [esi + 0x134]
push ebp
push edi
mov edi, dword [esi]
push 1
push 0
push edi
or ebp, 0xffffffff
mov dword [esp + 0x18], 0x10
call fcn.004b08b0
add esp, 0xc
test eax, eax
jl 0x4bddb9
mov ecx, 0x3e8
cmp eax, ecx
jge 0x4bdd90
mov ecx, eax
push ecx
push 0xffffffffffffffff
push ebx
call fcn.004c5da0
add esp, 0xc
cmp eax, 0xffffffff
je 0x4bde54
test eax, eax
jne 0x4bddde
push 1
push eax
push edi
call fcn.004b08b0
add esp, 0xc
test eax, eax
jge 0x4bdd85
push str.Timeout_while_waiting_for_server_connect
push edi
call fcn.004b0470
add esp, 8
pop edi
pop ebp
mov eax, 0x1c
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0047e001
add esp, 0x18
ret
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x14]
push ecx
push ebx
call dword [sym.imp.WSOCK32.dll_getsockname]
test eax, eax
jne 0x4bde0e
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x14]
push eax
push ebx
mov dword [esp + 0x18], 0x10
call dword [sym.imp.WSOCK32.dll_accept]
mov ebp, eax
push ebx
push esi
call fcn.004b10c0
add esp, 8
cmp ebp, 0xffffffff
jne 0x4bde24
push str.Error_accept__ing_server_connect
jmp 0x4bde59
push str.Connection_accepted_from_server_n
push edi
call fcn.004b03e0
push 1
push ebp
mov dword [esi + 0x134], ebp
call fcn.004c9970
add esp, 0x10
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x14]
xor ecx, esp
call fcn.0047e001
add esp, 0x18
ret
push str.Error_while_waiting_for_server_connect
push edi
call fcn.004b0470
mov ecx, dword [esp + 0x28]
add esp, 8
pop edi
pop ebp
pop ebx
xor ecx, esp
mov eax, 0x1e
call fcn.0047e001
add esp, 0x18
ret
Function at 0x4c5da0
Capabilities:
Check for time delay via gettickcount
Get socket status

Disassembly:
sub esp, 0x31c
push ebx
mov ebx, dword [esp + 0x324]
push ebp
mov ebp, dword [esp + 0x32c]
push esi
xor esi, esi
cmp ebx, 0xffffffff
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], esi
jne 0x4c5de4
cmp ebp, ebx
jne 0x4c5de4
mov eax, dword [esp + 0x334]
push eax
call fcn.004c5d70
add esp, 4
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret
push edi
mov edi, dword [esp + 0x338]
cmp edi, esi
jle 0x4c5dff
mov esi, edi
call fcn.004b51c0
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
xor eax, eax
xor ecx, ecx
or edx, 0xffffffff
cmp ebx, 0xffffffff
mov dword [esp + 0x20], ecx
mov dword [esp + 0x124], eax
je 0x4c5e33
mov ecx, 1
mov dword [esp + 0x128], ebx
mov dword [esp + 0x124], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ecx
mov edx, ebx
cmp ebp, 0xffffffff
mov dword [esp + 0x228], eax
je 0x4c5e7a
test ecx, ecx
mov dword [esp + 0x22c], ebp
mov dword [esp + 0x228], 1
jbe 0x4c5e62
cmp dword [esp + eax*4 + 0x24], ebp
je 0x4c5e62
add eax, 1
cmp eax, ecx
jb 0x4c5e55
cmp eax, ecx
jne 0x4c5e74
cmp ecx, 0x40
jae 0x4c5e74
mov dword [esp + eax*4 + 0x24], ebp
add dword [esp + 0x20], 1
cmp ebp, edx
jbe 0x4c5e7a
mov edx, ebp
xor ebx, ebx
test edi, edi
setl bl
lea ecx, [esp + 0x18]
lea ebp, [edx + 1]
sub ebx, 1
and ebx, ecx
lea ecx, [ecx]
xor eax, eax
cmp edi, eax
jle 0x4c5ec1
mov eax, 0x10624dd3
imul esi
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x18], eax
imul eax, eax, 0x3e8
mov edx, esi
sub edx, eax
imul edx, edx, 0x3e8
mov dword [esp + 0x1c], edx
jmp 0x4c5ecb
jne 0x4c5ecb
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
push ebx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x230]
push ecx
lea edx, [esp + 0x130]
push edx
push ebp
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 0xffffffff
jne 0x4c5f35
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
test eax, eax
je 0x4c5efe
cmp eax, 0x2714
jne 0x4c5f39
test edi, edi
jle 0x4c5e90
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.004b51c0
push edx
push eax
call fcn.004b51f0
mov esi, edi
sub esi, eax
add esp, 0x10
test esi, esi
jg 0x4c5e90
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x31c
ret
test eax, eax
jge 0x4c5f47
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x31c
ret
jne 0x4c5f56
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x31c
ret
mov edi, dword [esp + 0x330]
xor esi, esi
cmp edi, 0xffffffff
je 0x4c5f8d
lea edx, [esp + 0x124]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4c5f7b
mov esi, 1
lea eax, [esp + 0x20]
push eax
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4c5f8d
or esi, 4
mov edi, dword [esp + 0x334]
cmp edi, 0xffffffff
je 0x4c5fc0
lea ecx, [esp + 0x228]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4c5fae
or esi, 2
lea edx, [esp + 0x20]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4c5fc0
or esi, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x31c
ret