joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a7e70
Capabilities:
Create thread

Disassembly:
push ebx
push ebp
push esi
push edi
push 0xb2c
push 1
call fcn.004e0c85
mov esi, eax
xor ebx, ebx
add esp, 8
cmp esi, ebx
je 0x4a801a
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
mov dword [esi], edi
mov dword [edi + 0x90], eax
mov ecx, dword [esi]
mov dword [ecx + 0x18], ebx
mov edx, dword [esi]
mov dword [edx + 0x1c], ebx
mov eax, dword [esi]
mov dword [eax + 0x84], ebx
mov ecx, dword [esp + 0x14]
push esi
push ecx
call fcn.004a8030
add esp, 8
test eax, eax
jne 0x4a8011
push esi
mov dword [edi + 4], esi
call fcn.00410e00
push esi
call fcn.004d0970
mov edx, dword [esi]
mov ebp, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
add esp, 8
add edx, 0x8c
push ebx
push edx
call ebp
cmp edi, ebx
je 0x4a801a
mov eax, dword [edi + 4]
mov dword [eax + 0x3a4], 1
mov eax, dword [edi]
test eax, 0x10000
je 0x4a7f57
push edi
push ebx
push 0x4a7b70
call fcn.004e0dc2
add esp, 0xc
cmp eax, 0xffffffff
mov dword [edi + 0x9c], eax
je 0x4a801a
lea esi, [edi + 0x8c]
push 1
push esi
call ebp
cmp eax, 2
je 0x4a7f4b
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
call ebx
push 1
push esi
call ebp
cmp eax, 2
jne 0x4a7f3d
push 2
push esi
call ebp
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov esi, dword [edi + 4]
push edi
call fcn.004a8210
mov eax, dword [esi + 0x3a4]
add esp, 4
cmp eax, ebx
je 0x4a801a
mov esi, dword [edi + 4]
mov ecx, dword [esi + 0x3e4]
mov edx, dword [esi + 0x3e0]
sub ecx, edx
mov edx, dword [esi]
mov dword [edx + 0x80], ecx
mov eax, dword [esi]
test dword [eax], 0x80000
jne 0x4a7fa6
mov eax, dword [eax + 0x94]
cmp eax, ebx
je 0x4a7fa6
push ebx
push eax
call dword [sym.imp.WINMM.dll_mmioClose]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x4a7fb6
push eax
call fcn.004dec83
add esp, 4
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x4a7fc6
push eax
call fcn.004dec83
add esp, 4
lea eax, [esi + 0x1bc]
mov ecx, 0x18
mov dword [eax], ebx
add eax, 0x10
dec ecx
jne 0x4a7fd1
mov eax, dword [esi]
cmp dword [eax + 0x70], ebx
je 0x4a7ff0
lea eax, [esi + 0x3c]
mov ecx, 0x18
mov dword [eax], ebx
add eax, 0x10
dec ecx
jne 0x4a7fe8
push esi
call fcn.00410f10
push esi
call fcn.004d0b60
mov ecx, dword [esi]
add esp, 8
add ecx, 0x8c
push 6
push ecx
call ebp
mov edx, dword [esi]
mov dword [edx + 4], ebx
push esi
call fcn.004dec83
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x4a8540
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x4ef308
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
call fcn.0045ae70
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x9c], eax
mov eax, dword [esp + 0x2c]
xor edi, edi
lea ebx, [esi + 0x24]
mov dword [esi], 0x4f97f0
mov dword [esi + 0xa0], ecx
mov dword [esi + 0xa4], eax
mov dword [esi + 0xac], edi
mov eax, dword [eax*4 + 0x5496ac]
lea ebp, [esi + 0x20]
push ebx
push ebp
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], eax
mov dword [esi + 8], str.pointer_gump
call fcn.004447f0
push str.framedata_for_pointgump
push 8
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], 1
call fcn.00479630
mov ecx, dword [esi + 0x18]
mov edi, eax
shl ecx, 3
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esi + 0x3c], edi
push str.point_frame0
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp]
imul eax, dword [ebx]
lea ecx, [eax + eax + 4]
push ecx
call fcn.00479630
mov edx, dword [esi + 0x3c]
mov dword [edx + 4], eax
mov eax, dword [esi + 0x3c]
mov dx, word [ebp]
mov ecx, dword [eax + 4]
mov word [ecx], dx
mov eax, dword [esi + 0x3c]
mov dx, word [ebx]
mov ecx, dword [eax + 4]
xor eax, eax
mov word [ecx + 2], dx
mov ecx, dword [ebp]
imul ecx, dword [ebx]
mov edx, dword [esi + 0x3c]
shl ecx, 1
mov edi, dword [edx + 4]
mov edx, ecx
add edi, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx]
mov edx, dword [esi + 0x3c]
mov ecx, dword [ebp]
push eax
mov eax, dword [edx + 4]
push ecx
add eax, 4
push eax
push 0
mov ecx, dword [esp + 0x50]
push 0
push ecx
push fcn.004bfae0
call fcn.00444850
mov ecx, dword [esp + 0x4c]
add esp, 0x38
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
Function at 0x4af340
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x4ef708
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
call fcn.0045ae70
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x24]
mov dword [esi + 0xa0], ecx
mov ecx, dword [esp + 0x28]
mov dword [esi + 0xb0], edx
mov edx, dword [esp + 0x2c]
mov dword [esi + 0xac], ecx
mov ecx, dword [esp + 0x30]
xor eax, eax
push str.framedata_for_pointgump
push 8
mov dword [esp + 0x24], eax
mov dword [esi], 0x4fa254
mov dword [esi + 8], str.Simple_button
mov dword [esi + 0xa8], edx
mov dword [esi + 0x9c], ecx
mov byte [esi + 0xa5], al
mov byte [esi + 0xa4], al
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], 1
call fcn.00479630
mov ecx, dword [esi + 0x18]
mov edi, eax
shl ecx, 3
mov edx, ecx
xor eax, eax
shr ecx, 2
mov dword [esi + 0x3c], edi
lea ebp, [esi + 0x24]
rep stosd dword es:[edi], eax
mov ecx, edx
lea ebx, [esi + 0x20]
and ecx, 3
push ebp
rep stosb byte es:[edi], al
mov eax, dword [esi + 0xb0]
push ebx
push eax
call fcn.004447f0
mov ecx, dword [ebx]
push str.frame0
imul ecx, dword [ebp]
lea edx, [ecx + ecx + 4]
push edx
call fcn.00479630
mov ecx, dword [esi + 0x3c]
add esp, 0x1c
mov dword [ecx + 4], eax
mov edx, dword [esi + 0x3c]
mov cx, word [ebx]
mov eax, dword [edx + 4]
mov word [eax], cx
mov edx, dword [esi + 0x3c]
mov cx, word [ebp]
mov eax, dword [edx + 4]
mov word [eax + 2], cx
mov al, byte [esi + 0xa4]
test al, al
je 0x4af449
mov edx, dword [esi + 0xa8]
mov dword [esp + 0x34], edx
jmp 0x4af469
mov al, byte [esi + 0xa5]
test al, al
je 0x4af45f
mov eax, dword [esi + 0xac]
mov dword [esp + 0x34], eax
jmp 0x4af469
mov ecx, dword [esi + 0xb0]
mov dword [esp + 0x34], ecx
mov ecx, dword [ebx]
mov edx, dword [esi + 0x3c]
imul ecx, dword [ebp]
mov edi, dword [edx + 4]
xor eax, eax
shl ecx, 1
mov edx, ecx
add edi, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp]
mov edx, dword [esi + 0x3c]
mov ecx, dword [ebx]
push eax
mov eax, dword [edx + 4]
push ecx
mov ecx, dword [esp + 0x3c]
add eax, 4
push eax
push 7
push 0xa
push ecx
push fcn.004c00b0
call fcn.00444850
mov ecx, dword [esp + 0x30]
add esp, 0x1c
mov eax, esi
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14
Function at 0x4b4b60
Capabilities:
Get geographical location

Disassembly:
push 0xffffffffffffffff
push 0x4ef8f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, ecx
push edi
mov dword [esp + 8], esi
mov dword [esi], 0x4fab30
xor edi, edi
mov dword [0xb660f4], edi
mov dword [0xb6612c], edi
mov eax, dword [esi + 0x3c]
mov dword [esp + 0x14], edi
mov eax, dword [eax + 4]
cmp eax, edi
je 0x4b4bb4
push str.CityChoice_frame0_pBMP
push eax
call fcn.00479670
mov ecx, dword [esi + 0x3c]
add esp, 8
mov dword [ecx + 4], edi
mov eax, dword [esi + 0x3c]
cmp eax, edi
je 0x4b4bcc
push str.CityChoice_framedata
push eax
call fcn.00479670
add esp, 8
mov dword [esi + 0x3c], edi
mov ecx, dword [esi + 0x100]
cmp ecx, edi
je 0x4b4bdc
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, dword [esi + 0xf8]
cmp ecx, edi
je 0x4b4bec
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [esi + 0xf4]
cmp ecx, edi
je 0x4b4bfc
mov edx, dword [ecx]
push 1
call dword [edx]
mov ecx, dword [esi + 0xfc]
cmp ecx, edi
je 0x4b4c0c
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, esi
mov dword [esp + 0x14], 0xffffffff
call fcn.0045af30
mov ecx, dword [esp + 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x4c05c0
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
mov ecx, dword [esp + 0xc]
push esi
test ecx, ecx
je 0x4c0692
xor eax, eax
mov esi, dword [esp + 0x14]
mov ax, word [ecx + 6]
lea edx, [ecx + eax*2 + 8]
add ecx, 8
mov dword [esp + 4], edx
mov edx, dword [0xd15ad8]
imul edx, dword [esp + 0x18]
add edx, esi
mov esi, dword [0xd15adc]
test eax, eax
lea edx, [esi + edx*2]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], edx
jle 0x4c0692
push ebx
push ebp
push edi
mov dword [esp + 0x20], eax
xor eax, eax
mov ax, word [ecx]
mov ecx, dword [esp + 0x10]
mov bp, word [ecx + eax*2]
lea esi, [ecx + eax*2]
add esi, 2
mov di, word [esi]
add esi, 2
test di, di
je 0x4c0669
mov eax, dword [esp + 0x1c]
mov edx, ebp
mov ebx, edi
and edx, 0xffff
and ebx, 0xffff
push ebx
lea ecx, [eax + edx*2]
push esi
push ecx
call dword [esp + 0x24]
lea esi, [esi + ebx*2]
xor eax, eax
add esp, 0xc
mov ax, word [esi]
add esi, 2
add eax, edi
mov di, word [esi]
add ebp, eax
add esi, 2
test di, di
jne 0x4c062e
mov edx, dword [esp + 0x1c]
mov eax, dword [0xd15ad8]
lea ecx, [edx + eax*2]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x24]
add ecx, 2
dec eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
jne 0x4c0610
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret

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

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, ecx
mov ecx, dword [esp + 0xc]
push 0
mov edx, dword [esi + 4]
push eax
push ecx
push edx
mov bl, 1
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x4c06db
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov dword [esi + 0x41c], eax
call fcn.004c08a0
add esp, 4
xor al, al
pop esi
pop ebx
ret 8
mov al, bl
pop esi
pop ebx
ret 8

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

Disassembly:
push esi
mov esi, ecx
push 0
push 0x400
mov ecx, dword [esi + 4]
lea eax, [esi + 0x18]
push eax
push ecx
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
jne 0x4c0729
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2733
mov dword [esi + 0x41c], eax
je 0x4c0727
push eax
call fcn.004c08a0
add esp, 4
xor eax, eax
pop esi
ret

Function at 0x4c0730
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
sub esp, 8
push esi
mov esi, ecx
push 0
push 1
push 2
mov dword [esi], 0x4fb86c
mov dword [esi + 4], 0xffffffff
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x4c076a
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov dword [esi + 0x41c], eax
call fcn.004c08a0
add esp, 4
mov eax, dword [esp + 0x10]
push eax
call sub.WSOCK32.dll_htonl
mov ecx, dword [esp + 0x14]
mov dword [esi + 0xc], eax
push ecx
call sub.WSOCK32.dll_htons
lea edx, [esp + 4]
push 4
mov word [esi + 0xa], ax
mov eax, dword [esi + 4]
push edx
push 4
push 0xffff
push eax
mov dword [esp + 0x18], 1
call sub.WSOCK32.dll_setsockopt
mov edx, dword [esi + 4]
lea ecx, [esp + 8]
push ecx
push 0x8004667e
push edx
mov word [esi + 8], 2
mov dword [esp + 0x14], 1
call sub.WSOCK32.dll_ioctlsocket
mov dword [esi], 0x4fb870
mov eax, esi
pop esi
add esp, 8
ret 8
Function at 0x4c0820
Capabilities:
Connect socket

Disassembly:
push ebx
push esi
mov esi, ecx
push 0x10
mov bl, 1
mov ecx, dword [esi + 4]
lea eax, [esi + 8]
push eax
push ecx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x4c0899
call sub.WSOCK32.dll_WSAGetLastError
cmp eax, 0x2734
mov dword [esi + 0x41c], eax
je 0x4c087a
cmp eax, 0x2733
je 0x4c087a
cmp eax, 0x2748
je 0x4c087a
cmp eax, 0x2726
je 0x4c087a
push eax
call fcn.004c08a0
mov edx, dword [esi + 4]
add esp, 4
push edx
call sub.WSOCK32.dll_closesocket
mov dword [esi + 4], 0xffffffff
mov esi, dword [esi + 0x41c]
xor al, al
cmp esi, 0x2748
jne 0x4c088c
mov al, 1
cmp esi, 0x2726
jne 0x4c089b
pop esi
mov al, 1
pop ebx
ret
mov al, bl
pop esi
pop ebx
ret

Function at 0x4c0bf0
Capabilities:
Get hostname
Resolve dns

Disassembly:
push 0xffffffffffffffff
push 0x4efd3b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x108
push ebx
push esi
mov esi, ecx
push edi
push str.CSocket::CSocket___begin._n
mov dword [esp + 0x14], esi
mov dword [esi], 0x4fb874
call fcn.004ceb00
add esp, 4
mov dword [esi + 4], 0xffffffff
xor edi, edi
push str.GroupedPackets::GroupedPackets__:_begin._n
mov dword [esp + 0x120], edi
call fcn.004ceb00
add esp, 4
mov dword [esi + 0x3005c], edi
mov dword [esi + 0x30058], edi
mov dword [esi + 0x30060], edi
lea ecx, [esi + 0x30064]
mov byte [esp + 0x11c], 1
call fcn.004c8760
push str.CClientSock::CClientSock__:_begin._n
mov byte [esp + 0x120], 2
mov dword [esi], 0x4fb878
call fcn.004ceb00
add esp, 4
lea eax, [esp + 0x14]
mov dword [esi + 8], edi
mov dword [esi + 0x18], edi
push 0x100
push eax
mov dword [esi + 0x10020], edi
mov dword [esi + 0x10024], edi
mov dword [esi + 0x30050], edi
mov dword [esi + 0x3004c], edi
mov dword [esi + 0x3002c], edi
mov dword [esi + 0x30028], edi
mov dword [esi + 0x30044], edi
call sub.WSOCK32.dll_gethostname
lea ecx, [esp + 0x14]
push ecx
call sub.WSOCK32.dll_gethostbyname
cmp eax, edi
je 0x4c0ce0
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call sub.WSOCK32.dll_ntohl
jmp 0x4c0ce2
xor eax, eax
mov dword [esi + 0x30048], eax
call fcn.004c1a40
push 0x22
mov dword [esi + 0x10], edi
call fcn.004ddf8e
mov ebx, eax
add esp, 4
mov dword [esp + 0xc], ebx
cmp ebx, edi
mov byte [esp + 0x11c], 3
je 0x4c0d19
push 1
push 1
mov ecx, ebx
call fcn.00410320
jmp 0x4c0d1b
xor ebx, ebx
xor edx, edx
mov ecx, dword [esp + 0x114]
mov dword [esi + 0x14], ebx
mov dword [esi + 0x30030], edx
mov dword [esi + 0x30034], edx
mov eax, esi
mov dword [esi + 0x30038], edx
pop edi
mov dword [esi + 0x3003c], edx
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x114
ret
Function at 0x4c0e30
Capabilities:
Encode data using xor

Disassembly:
mov eax, ecx
push ebx
mov ecx, dword [0xcc516c]
push esi
test ecx, ecx
push edi
je 0x4c0f18
mov edi, dword [eax + 0x3002c]
mov edx, dword [esp + 0x14]
lea ecx, [edi + edx]
cmp ecx, 0x10000
jg 0x4c0f18
mov ecx, dword [eax + 0x30040]
test ecx, ecx
je 0x4c0ef7
mov ecx, dword [eax + 0x18]
test ecx, ecx
mov ecx, edx
jne 0x4c0ef9
dec edx
test ecx, ecx
je 0x4c0f18
mov ebx, dword [esp + 0x10]
push ebp
lea ebp, [edx + 1]
mov dl, byte [eax + 0x30030]
mov cl, byte [ebx]
xor dl, cl
mov ecx, dword [eax + 0x3002c]
mov byte [ecx + eax + 0x20028], dl
mov edi, dword [eax + 0x3002c]
mov edx, dword [eax + 0x30030]
mov ecx, dword [eax + 0x30034]
inc edi
mov esi, ecx
mov dword [eax + 0x3002c], edi
mov edi, edx
shl edi, 0x1f
shr ecx, 1
or ecx, edi
inc ebx
xor ecx, 0x2dbbb7cc
shl esi, 0x1f
shr ecx, 1
shr edx, 1
or ecx, edi
or edx, esi
xor ecx, 0x2dbbb7cd
xor edx, 0xa3c95e7f
dec ebp
mov dword [eax + 0x30034], ecx
mov dword [eax + 0x30030], edx
jne 0x4c0e88
pop ebp
pop edi
pop esi
pop ebx
ret 8
mov ecx, edx
mov esi, dword [esp + 0x10]
mov ebx, ecx
lea edi, [edi + eax + 0x20028]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [eax + 0x3002c], edx
pop edi
pop esi
pop ebx
ret 8
Function at 0x4c0f20
Capabilities:
Connect socket
Print debug messages
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x18]
push esi
push edi
mov esi, ecx
xor edi, edi
push eax
mov dword [esi + 0x30050], edi
mov dword [esi + 0x3004c], edi
mov dword [esi + 0x3002c], edi
mov dword [esi + 0x30028], edi
call sub.WSOCK32.dll_htonl
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x10], eax
push ecx
call sub.WSOCK32.dll_htons
push edi
push 1
push 2
mov word [esp + 0x1a], ax
call sub.WSOCK32.dll_socket
cmp eax, 0xffffffff
mov dword [esi + 4], eax
jne 0x4c0f85
push str.socket_creation_failed
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
xor eax, eax
pop esi
add esp, 0x14
ret 8
lea edx, [esp + 8]
push 4
push edx
push 1
push 6
push eax
mov dword [esp + 0x1c], 1
call sub.WSOCK32.dll_setsockopt
mov ecx, dword [esi + 4]
lea eax, [esp + 0xc]
push 0x10
push eax
push ecx
mov word [esp + 0x18], 2
call sub.WSOCK32.dll_connect
test eax, eax
je 0x4c0fd3
mov edx, dword [esi + 4]
push edx
call sub.WSOCK32.dll_closesocket
mov dword [esi + 4], 0xffffffff
pop edi
xor eax, eax
pop esi
add esp, 0x14
ret 8
cmp dword [0xcc5190], edi
jne 0x4c10d7
mov dword [esi + 0x30040], 1
mov ecx, dword [0xcc51c0]
cmp ecx, edi
jne 0x4c0fff
mov ecx, dword [esi + 0x30048]
mov dword [0xcc51c0], ecx
mov eax, ecx
xor ecx, 0xffffaaaa
not eax
mov edx, eax
and ecx, 0xffff
xor edx, 0x1357
mov dword [esp + 0x24], edi
shl edx, 0x10
or ecx, edx
mov dword [esi + 0x30030], ecx
mov edx, dword [0xcc51c0]
mov ecx, eax
xor edx, 0x43210000
xor ecx, 0xabcdffff
and ecx, 0xffff0000
shr edx, 0x10
or ecx, edx
mov dword [esi + 0x30034], ecx
mov ecx, dword [0xcc51c0]
mov edx, ecx
xor edx, eax
and edx, 0xf0f0f0f
xor edx, ecx
xor edx, 0xa76e25ea
mov dword [esi + 0x30038], edx
mov ecx, dword [0xcc51c0]
xor ecx, eax
lea edx, [esp + 0x24]
and ecx, 0xf0f0f0f
push edx
xor ecx, eax
mov eax, dword [esi + 4]
xor ecx, 0xf4bc319d
push 0x8004667e
push eax
mov dword [esi + 0x3003c], ecx
call sub.WSOCK32.dll_ioctlsocket
mov ecx, dword [0xcc51c0]
push ecx
call sub.WSOCK32.dll_htonl
mov dword [esp + 0x20], eax
mov eax, dword [esi + 4]
push edi
lea edx, [esp + 0x24]
push 4
push edx
push eax
call sub.WSOCK32.dll_send
mov ecx, dword [esi + 0x30034]
mov edx, dword [esp + 0x20]
mov dword [0xd15af4], ecx
push edx
lea ecx, [esi + 0x30064]
call fcn.004c8770
jmp 0x4c10dd
mov dword [esi + 0x30040], edi
mov ecx, dword [esi + 4]
lea eax, [esp + 0x20]
push eax
push 0x8004667e
push ecx
mov dword [esp + 0x2c], 1
call sub.WSOCK32.dll_ioctlsocket
pop edi
mov eax, 1
pop esi
add esp, 0x14
ret 8
Function at 0x4c1630
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
sub esp, 0x40c
push esi
mov esi, ecx
test esi, esi
push edi
je 0x4c17dc
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
jne 0x4c166a
mov eax, dword [0xcc51bc]
test eax, eax
jne 0x4c17dc
push str.dunno__select_with_invalid_socket
call fcn.004c1110
pop edi
pop esi
add esp, 0x40c
ret
mov edx, dword [esi + 0x3002c]
mov ecx, 1
test edx, edx
mov dword [esp + 8], 0
mov dword [esp + 0x214], eax
mov dword [esp + 0x210], ecx
jle 0x4c1697
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
mov dword [esp + 0x110], eax
push eax
push esi
lea eax, [esp + 0x31c]
push str._08x::SelectPoll___m_sock___d_n
push eax
mov dword [esp + 0x11c], ecx
call fcn.004de113
add esp, 0x10
lea ecx, [esp + 0x10c]
lea edx, [esp + 8]
lea eax, [esp + 0x210]
push 0xd15ae8
push ecx
mov ecx, dword [esi + 4]
push edx
inc ecx
push eax
push ecx
call sub.WSOCK32.dll_select
cmp eax, 0xffffffff
je 0x4c17dc
mov eax, dword [esi + 4]
lea edx, [esp + 0x10c]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4c1728
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4c1713
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi + 4], 0xffffffff
push str.exception_state_on_socket
mov ecx, esi
call fcn.004c1110
pop edi
pop esi
add esp, 0x40c
ret
mov edx, dword [esi + 4]
lea ecx, [esp + 0x210]
push ecx
push edx
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4c17b2
mov eax, dword [esi + 0x30028]
mov edi, 0x10000
sub edi, eax
test edi, edi
jle 0x4c176f
mov ecx, dword [esi + 4]
push 0
lea eax, [eax + esi + 0x10028]
push edi
push eax
push ecx
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x4c177b
add dword [esi + 0x30028], eax
jmp 0x4c1771
xor eax, eax
cmp eax, edi
jne 0x4c17b2
test edi, edi
jle 0x4c17b2
jmp 0x4c173d
call sub.WSOCK32.dll_WSAGetLastError
push eax
mov ecx, esi
call fcn.004c1380
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4c179d
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi + 4], 0xffffffff
push str.Exiting_due_to_closed_connection.
mov ecx, esi
call fcn.004c1110
pop edi
pop esi
add esp, 0x40c
ret
mov eax, dword [esi + 4]
lea edx, [esp + 8]
push edx
push eax
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
je 0x4c17cb
mov ecx, esi
call fcn.004c17f0
mov eax, dword [esi + 0x30028]
test eax, eax
jle 0x4c17dc
mov ecx, esi
call fcn.004c1b20
pop edi
pop esi
add esp, 0x40c
ret
Function at 0x4c17f0
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, 0x10000
call fcn.004ddb80
push ebx
push esi
mov esi, ecx
cmp dword [esi + 4], 0xffffffff
jne 0x4c1822
mov eax, dword [0xcc51bc]
test eax, eax
jne 0x4c1817
push str.dunno__select_with_invalid_socket
call fcn.004c1110
pop esi
xor eax, eax
pop ebx
add esp, 0x10000
ret
mov eax, dword [esi + 0x1c]
xor ebx, ebx
cmp eax, ebx
je 0x4c1906
mov eax, dword [esi + 0x3002c]
mov ecx, dword [esi + 0x10]
push edi
lea edx, [ecx + eax]
cmp edx, 0x522c
jbe 0x4c184d
mov edi, 0x522c
sub edi, ecx
jmp 0x4c184f
mov edi, eax
cmp edi, eax
jne 0x4c1878
push eax
lea eax, [esp + 0x10]
lea ecx, [esi + 0x20028]
push eax
push ecx
mov ecx, dword [esi + 0x14]
call fcn.004103f0
mov eax, dword [esi + 0x3002c]
mov ecx, dword [esi + 0x10]
add ecx, eax
mov dword [esi + 0x10], ecx
jmp 0x4c18d8
cmp edi, ebx
je 0x4c1891
mov ecx, dword [esi + 0x14]
lea edx, [esp + 0xc]
push edi
lea eax, [esi + 0x20028]
push edx
push eax
call fcn.004103f0
mov ecx, dword [esi + 0x14]
xor eax, eax
push ebp
mov ebp, 0xb
mov al, byte [ecx + 0x21]
add eax, 3
cdq
idiv ebp
push edx
push ebx
call fcn.00410320
mov ecx, dword [esi + 0x3002c]
lea edx, [esp + edi + 0x10]
sub ecx, edi
lea eax, [edi + esi + 0x20028]
push ecx
mov ecx, dword [esi + 0x14]
push edx
push eax
call fcn.004103f0
mov eax, dword [esi + 0x3002c]
pop ebp
mov ecx, eax
sub ecx, edi
mov dword [esi + 0x10], ecx
lea edx, [esp + 0xc]
push eax
push edx
lea ecx, [esi + 0x30064]
mov byte [esp + eax + 0x14], bl
call fcn.004c8800
mov eax, dword [esi + 0x3002c]
mov edx, dword [esi + 4]
push ebx
lea ecx, [esp + 0x10]
push eax
push ecx
push edx
call sub.WSOCK32.dll_send
pop edi
jmp 0x4c192b
mov eax, dword [esi + 0x3002c]
push ebx
lea edx, [esi + 0x20028]
mov byte [eax + esi + 0x20028], bl
mov ecx, dword [esi + 0x3002c]
mov eax, dword [esi + 4]
push ecx
push edx
push eax
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
jne 0x4c195c
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x4c1945
push eax
call sub.WSOCK32.dll_closesocket
mov dword [esi + 4], 0xffffffff
push str.socket_error_in_send
mov ecx, esi
call fcn.004c1110
pop esi
xor eax, eax
pop ebx
add esp, 0x10000
ret
cmp eax, ebx
jle 0x4c1989
mov edx, dword [esi + 0x3002c]
mov ecx, eax
cmp eax, edx
jge 0x4c1989
mov bl, byte [esi + ecx + 0x20028]
mov edx, ecx
sub edx, eax
inc ecx
mov byte [edx + esi + 0x20028], bl
mov edx, dword [esi + 0x3002c]
cmp ecx, edx
jl 0x4c196c
mov ecx, dword [esi + 0x3002c]
sub ecx, eax
mov eax, 0
mov dword [esi + 0x3002c], ecx
pop esi
setne al
pop ebx
add esp, 0x10000
ret

Function at 0x4c19d0
Capabilities:
Initialize winsock library

Disassembly:
push esi
mov esi, ecx
push str.CNetInfo::CNetInfo__:_begin._n
mov dword [esi], 0x4fb87c
call fcn.004ceb00
add esp, 4
lea eax, [esi + 4]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x4c1a0c
push 0
push str.SockLib_Error
push str._r_nCNetInfo::CNetInfo____WSAStartup_failed.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, esi
pop esi
ret