joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4771b0
Capabilities:
Receive data
Receive data on socket

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

Function at 0x477520
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov edx, dword [esp + 8]
sub esp, 0x80
xor eax, eax
push ebx
mov ebx, dword [esp + 0x88]
push ebp
push esi
mov esi, edx
mov ecx, dword [ebx + 0x1c4]
cmp edx, ecx
push edi
sete al
sub esi, ecx
neg esi
sbb esi, esi
and esi, 0xfffffff0
lea eax, [eax*4 + 0x1c0]
mov ebp, dword [eax + ebx]
add esi, 0x1f4
mov eax, dword [ebx + 0x2e8]
add esi, ebx
mov edi, dword [esi + 4]
sub edi, dword [esi + 8]
test byte [eax + 0x40], 3
je 0x477604
xor eax, eax
cmp edx, ecx
sete al
lea eax, [eax*4 + 0x1d4]
cmp dword [eax + ebx], 0x477230
jne 0x477604
cmp dword [esi], 0
je 0x477595
test edi, edi
je 0x477604
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ebp
call fcn.0047a0a0
add esp, 0x14
cmp eax, 0xffffffff
je 0x477604
test al, 1
je 0x477604
cmp dword [esi], 0
jne 0x4775de
mov eax, dword [ebx]
mov eax, dword [eax + 0x8fc]
add eax, eax
push eax
mov dword [esi + 4], eax
call dword [0x59c9a4]
mov edi, dword [esi + 4]
add esp, 4
mov dword [esi], eax
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov ecx, dword [esi]
test ecx, ecx
je 0x4775fd
mov eax, dword [esi + 8]
push 0
push edi
add eax, ecx
push eax
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x477604
add dword [esi + 8], eax
jmp 0x477604
mov dword [esi + 4], 0
push 0
push dword [esp + 0xa4]
push dword [esp + 0xa4]
push ebp
call dword [sym.imp.WS2_32.dll_send]
mov edi, eax
cmp edi, 0xffffffff
jne 0x47768e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x47764d
mov ecx, dword [esp + 0xa4]
lea eax, [edi + 0x52]
pop edi
pop esi
pop ebp
mov dword [ecx], 0
pop ebx
add esp, 0x80
ret
push 0x80
lea eax, [esp + 0x14]
push eax
push esi
call fcn.00494b00
push eax
push str.Send_failure:__s
push dword [ebx]
call fcn.00476fc0
mov eax, dword [ebx]
add esp, 0x18
mov ecx, dword [esp + 0xa4]
mov dword [eax + 0xd14], esi
mov eax, 0x37
mov dword [ecx], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
mov ecx, dword [esp + 0xa4]
xor eax, eax
mov dword [ecx], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x80
ret
Function at 0x4786c0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x188
push ebx
mov ebx, dword [esp + 0x190]
cmp dword [ebx + 0x90], 3
jne 0x4788f8
cmp byte [ebx + 0x2a5], 0
push ebp
push esi
push edi
jne 0x47888a
cmp byte [ebx + 0x2c0], 0
jne 0x47888a
mov esi, dword [esp + 0x1a0]
lea eax, [esp + 0x10]
mov ebp, dword [ebx]
push eax
lea eax, [esp + 0x11c]
mov dword [esp + 0x14], 0x80
push eax
push esi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x478754
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x18]
push 0x80
push eax
push esi
call fcn.00494b00
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebp
call fcn.00476fc0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
push 0x80
lea eax, [esp + 0x9c]
mov dword [esp + 0x18], 0x80
push 0
push eax
call fcn.00436fb0
add esp, 0xc
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x9c]
push eax
push esi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4787be
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x18]
push 0x80
push eax
push esi
call fcn.00494b00
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebp
call fcn.00476fc0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
lea eax, [ebx + 0x138]
push eax
lea esi, [ebx + 0x10a]
push esi
push dword [esp + 0x18]
lea eax, [esp + 0x124]
push eax
call fcn.00477950
add esp, 0x10
test al, al
jne 0x47881e
call fcn.0042bb7f
mov esi, dword [eax]
call fcn.0042bb7f
mov edi, eax
lea eax, [esp + 0x18]
push 0x80
push eax
push esi
call fcn.00494b00
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00476fc0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
lea edi, [ebx + 0x5c]
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x16c]
push eax
lea eax, [ebx + 0x13c]
push eax
push dword [esp + 0x1c]
lea eax, [esp + 0xa4]
movsw word es:[edi], word [esi]
push eax
call fcn.00477950
add esp, 0x10
test al, al
jne 0x47888a
call fcn.0042bb7f
mov esi, dword [eax]
call fcn.0042bb7f
mov edi, eax
lea eax, [esp + 0x18]
push 0x80
push eax
push esi
call fcn.00494b00
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebp
call fcn.00476fc0
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x188
ret
mov edi, dword [ebx]
lea esi, [ebx + 0x10a]
add edi, 0x1088
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
mov ecx, 0xb
movsw word es:[edi], word [esi]
mov edi, dword [ebx]
lea esi, [ebx + 0x13c]
add edi, 0x10bc
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov eax, dword [ebx + 0x2e8]
mov ecx, dword [ebx]
pop edi
pop esi
mov eax, dword [eax]
mov dword [ecx + 0x10f0], eax
mov eax, dword [ebx + 0x2e8]
mov ecx, dword [ebx]
pop ebp
mov eax, dword [eax + 0x40]
mov dword [ecx + 0x10f4], eax
mov ecx, dword [ebx]
mov eax, dword [ebx + 0x138]
mov dword [ecx + 0x10b8], eax
mov ecx, dword [ebx]
mov eax, dword [ebx + 0x16c]
mov dword [ecx + 0x10ec], eax
pop ebx
add esp, 0x188
ret
Function at 0x4796b0
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 0x4796ca
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 0x4ebb70
push esi
call fcn.00432710
add esp, 8
test eax, eax
je 0x479712
test ebp, ebp
je 0x479703
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 0x479738
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x479738
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 0x4797ef
mov ecx, esi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x479755
sub ecx, ebx
lea eax, [ecx + 1]
add eax, edx
push eax
call dword [0x59c9a4]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4797e5
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4797e5
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x479787
sub ecx, edx
mov eax, 0x5c
mov word [ecx + ebx], ax
mov ecx, ebx
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4797a0
sub ecx, edx
sub ecx, esi
add ecx, ebx
lea ecx, [ecx]
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4797b0
test ebp, ebp
je 0x4797dc
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x59c9a8]
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 [0x59c9a8]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret
Function at 0x479920
Capabilities:
Get common file path
Initialize winsock library

Disassembly:
sub esp, 0x190
test byte [esp + 0x194], 2
je 0x479963
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x479957
mov eax, dword [esp]
cmp al, 2
jne 0x479951
shr eax, 8
cmp al, 2
je 0x479963
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
add esp, 0x190
ret
call fcn.00497380
test eax, eax
jne 0x479b5d
push esi
push edi
push str.kernel32
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
test edi, edi
jne 0x479990
mov dword [0x5a151c], esi
jmp 0x479ac0
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.LoadLibraryExA
push edi
call ebp
push 0x4ebb70
push str.iphlpapi.dll
mov ebx, eax
call fcn.00432710
add esp, 8
test eax, eax
je 0x4799e0
test ebx, ebx
je 0x4799ce
push 8
push 0
push str.iphlpapi.dll
call ebx
mov esi, eax
jmp 0x479aa3
push str.iphlpapi.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
jmp 0x479aa3
test ebx, ebx
je 0x479a05
push str.AddDllDirectory
push edi
call ebp
test eax, eax
je 0x479a05
push 0x800
push 0
push str.iphlpapi.dll
call ebx
mov esi, eax
jmp 0x479aa3
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebp, eax
test ebp, ebp
je 0x479a9d
lea ecx, [ebp + 0xd]
push ecx
call dword [0x59c9a4]
mov edi, eax
add esp, 4
test edi, edi
je 0x479a93
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x479a93
mov ecx, edi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x479a40
sub ecx, edx
mov eax, 0x5c
mov word [ecx + edi], ax
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x479a57
sub ecx, edx
mov edx, str.iphlpapi.dll
sub ecx, edx
add ecx, edi
lea esp, [esp]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x479a70
test ebx, ebx
je 0x479a8a
push 8
push 0
push edi
call ebx
jmp 0x479a91
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
push edi
call dword [0x59c9a8]
add esp, 4
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5a151c], esi
test esi, esi
je 0x479abe
push str.if_nametoindex
push esi
call ebp
test eax, eax
je 0x479abe
mov dword [0x5a1518], eax
pop ebp
pop ebx
push 0x9c
lea eax, [esp + 0xc]
push 0
push eax
call fcn.00436fb0
mov esi, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
add esp, 0xc
mov dword [esp + 8], 0x9c
mov dword [esp + 0xc], 6
mov dword [esp + 0x10], 0
push 3
push 2
push 0
push 0
mov dword [esp + 0x28], 2
call esi
push 3
push 1
push edx
push eax
call esi
push 3
push 0x20
push edx
push eax
call esi
push 3
push 0x10
push edx
push eax
call esi
push 1
push 8
push edx
push eax
call esi
push edx
push eax
push 0x33
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoA]
pop edi
pop esi
test eax, eax
je 0x479b54
push 0x5a1b80
mov byte [0x5a1b7c], 1
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
xor eax, eax
add esp, 0x190
ret
mov byte [0x5a1b7c], 0
xor eax, eax
add esp, 0x190
ret
Function at 0x483950
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
sub esp, 0x30
push esi
mov esi, dword [sym.imp.WS2_32.dll_socket]
push edi
push 6
push 1
push 2
mov dword [esp + 0x18], 0x10
mov dword [esp + 0x14], 1
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x483982
pop edi
or eax, eax
pop esi
add esp, 0x30
ret
push ebx
mov eax, 2
mov dword [esp + 0x1c], 0
push 0x7f000001
mov dword [esp + 0x24], 0
mov word [esp + 0x18], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov ebx, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
xor eax, eax
push 4
mov word [esp + 0x1a], ax
lea eax, [esp + 0x10]
push eax
push 4
push 0xffff
push edi
mov dword [ebx + 4], 0xffffffff
mov dword [ebx], 0xffffffff
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x483b15
push 0x10
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x483b15
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x483b15
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x483b15
push 0
push 1
push 2
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x483b15
push 0x10
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x483b15
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
je 0x483b15
push ebx
push 0x4ed420
lea eax, [esp + 0x2c]
push 0xc
push eax
call fcn.00485440
lea esi, [esp + 0x34]
add esp, 0x10
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x483a82
push 0
sub esi, ecx
lea eax, [esp + 0x28]
push esi
push eax
push dword [ebx]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x483b15
push 0
push 0xc
lea eax, [esp + 0x38]
push eax
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jne 0x483b15
lea ecx, [esp + 0x24]
lea edx, [esp + 0x30]
sub esi, 4
jb 0x483ad3
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x483ad8
add ecx, 4
add edx, 4
sub esi, 4
jae 0x483ac2
cmp esi, 0xfffffffc
je 0x483b05
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x483b15
cmp esi, 0xfffffffd
je 0x483b05
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x483b15
cmp esi, 0xfffffffe
je 0x483b05
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x483b15
cmp esi, 0xffffffff
je 0x483b05
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x483b15
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x30
ret
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
push edi
call esi
push dword [ebx]
call esi
push dword [ebx + 4]
call esi
pop ebx
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x30
ret
Function at 0x4872d0
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 0x487484
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
test edi, edi
je 0x48746d
mov eax, dword [edi + 4]
cmp eax, 2
jne 0x48731f
lea ebp, [eax + 0xe]
jmp 0x48732b
cmp eax, 0x17
jne 0x4873da
lea ebp, [eax + 5]
cmp dword [edi + 0x18], 0
je 0x4873da
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4873da
cmp eax, ebp
jb 0x4873da
push 0x20
call dword [0x59c9a4]
mov esi, eax
add esp, 4
test esi, esi
je 0x487462
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 [0x59c9a4]
add esp, 4
mov dword [esi + 0x18], eax
test eax, eax
je 0x487451
push ebp
push dword [edi + 0x18]
push eax
call fcn.00439170
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x4873c5
push eax
call dword [0x59c9b0]
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je 0x487437
test ebx, ebx
jne 0x4873cb
mov ebx, esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4873d6
mov dword [eax + 0x1c], esi
mov dword [esp + 0x10], esi
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x487312
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4873f8
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test ebp, ebp
je 0x487469
test ebx, ebx
je 0x487425
push dword [ebx + 0x18]
call dword [0x59c9a8]
push dword [ebx + 0x14]
call dword [0x59c9a8]
mov esi, dword [ebx + 0x1c]
push ebx
call dword [0x59c9a8]
add esp, 0xc
mov ebx, esi
test esi, esi
jne 0x487400
mov eax, dword [esp + 0x2c]
xor ebx, ebx
pop edi
pop esi
mov dword [eax], ebx
mov eax, ebp
pop ebp
pop ebx
add esp, 0xc
ret
push dword [esi + 0x18]
mov ebp, 8
call dword [0x59c9a8]
push esi
call dword [0x59c9a8]
add esp, 8
jmp 0x4873e9
push esi
mov ebp, 8
call dword [0x59c9a8]
add esp, 4
jmp 0x4873e9
mov ebp, 8
jmp 0x4873e9
test ebx, ebx
jne 0x487479
mov ebp, 0x2af9
push ebp
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x2c]
pop edi
pop esi
mov dword [eax], ebx
mov eax, ebp
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x487aa0
Capabilities:
Query environment variable

Disassembly:
mov eax, 0x1000
call fcn.004ba890
push dword [esp + 0x1004]
call fcn.004c7ed4
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x487aec
push 0x1000
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x487aec
lea eax, [esp]
push eax
call dword [0x59c9b0]
add esp, 4
add esp, 0x1000
ret
xor eax, eax
add esp, 0x1000
ret
Function at 0x48dc20
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x84
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x98]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0x80
push eax
mov ebp, dword [edi + 0x1c4]
or esi, 0xffffffff
mov ebx, dword [edi]
push ebp
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x48dc74
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.004779c0
add esp, 8
cmp esi, 0xffffffff
jne 0x48dca1
push str.Error_accept__ing_server_connect
push ebx
call fcn.00476fc0
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
push str.Connection_accepted_from_server_n
push ebx
call fcn.00477080
push 1
push esi
mov byte [edi + 0x2b0], 0
mov dword [edi + 0x1c4], esi
call fcn.00483b40
add esp, 0x10
mov byte [edi + 0x1d1], 1
cmp dword [ebx + 0x610], 0
je 0x48dd17
push 1
push ebx
call fcn.004656d0
mov eax, dword [ebx + 0x610]
push 1
push esi
push dword [ebx + 0x614]
call eax
push 0
push ebx
mov esi, eax
call fcn.004656d0
add esp, 0x1c
test esi, esi
je 0x48dd17
push edi
call fcn.0048e1a0
add esp, 4
mov eax, 0x2a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x84
ret
Function at 0x4a22c0
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0xc
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [0x59c9a4]
mov esi, eax
add esp, 4
test esi, esi
jne 0x4a22eb
pop esi
pop ebp
add esp, 0xc
ret
lea ecx, [esi + 0xc]
mov dword [esi], ebp
mov dword [esi + 4], ecx
mov eax, dword [ebp + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x24]
mov dword [esi + 8], eax
push edi
lea edi, [ebp + 4]
cmp ebx, dword [ebp + 0x10]
jbe 0x4a233a
mov eax, dword [ebp]
push ecx
call eax
mov eax, dword [edi]
push ebx
push dword [esp + 0x2c]
push dword [esi + 4]
call eax
mov eax, dword [esi + 8]
add eax, dword [ebp + 0xc]
push dword [esi + 4]
mov dword [esp + 0x28], eax
push eax
mov eax, dword [ebp + 8]
call eax
mov ebx, dword [ebp + 0x14]
add esp, 0x18
mov dword [esp + 0x28], ebx
jmp 0x4a2342
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], eax
push dword [esi + 4]
mov eax, dword [ebp]
call eax
push dword [esi + 8]
mov eax, dword [ebp]
call eax
mov eax, dword [esp + 0x30]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x4a23b3
mov ebp, dword [esp + 0x14]
mov ebx, eax
mov dword [esp + 0x18], eax
lea esp, [esp]
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x13], al
lea eax, [esp + 0x13]
push 1
push eax
push dword [esi + 4]
mov eax, dword [edi]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x1f], al
lea eax, [esp + 0x1f]
push 1
push eax
push dword [esi + 8]
mov eax, dword [edi]
call eax
add esp, 0x18
sub ebx, 1
jne 0x4a2370
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x20]
cmp ebx, dword [ebp + 0x10]
jae 0x4a23e5
jmp 0x4a23c0
mov eax, dword [edi]
push 1
push str.6Error_allocating_space_for_remote_banner
push dword [esi + 4]
call eax
mov eax, dword [edi]
push 1
push 0x4f3e57
push dword [esi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [ebp + 0x10]
jb 0x4a23c0
pop edi
pop ebx
mov eax, esi
pop esi
pop ebp
add esp, 0xc
ret
Function at 0x4a2440
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x59c074]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x218]
push eax
push esi
mov dword [esi + 0x170], 0
call fcn.004b2510
add esp, 8
test eax, eax
jne 0x4a25f3
mov edx, dword [ebp - 0x218]
mov eax, dword [esi + 0x164]
imul ecx, edx, 0x3e8
test eax, eax
push ebx
push edi
mov edi, 0x3e8
mov dword [ebp - 0x21c], eax
mov eax, dword [esi + 0x64]
cmove ecx, edi
test eax, eax
jle 0x4a2508
test edx, edx
je 0x4a24ac
cmp ecx, eax
jle 0x4a2508
push 0
call fcn.004c7116
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edx
push eax
call fcn.004c8094
fmul qword [0x4ed5b0]
add esp, 0x14
mov ecx, dword [esi + 0x64]
fstp qword [ebp - 0x214]
cvttsd2si eax, qword [ebp - 0x214]
cmp eax, ecx
jle 0x4a24ff
push str.API_timeout_expired
push 0xfffffffffffffff7
push esi
call fcn.004b2a70
add esp, 0xc
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00426cb5
mov esp, ebp
pop ebp
ret
sub ecx, eax
mov ebx, 1
jmp 0x4a250f
xor ebx, ebx
test ecx, ecx
setg bl
mov eax, 0x10624dd3
xor edi, edi
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [ebp - 0x214], eax
imul eax, eax, 0x3e8
sub ecx, eax
imul eax, ecx, 0x3e8
mov ecx, dword [ebp - 0x21c]
mov dword [ebp - 0x210], eax
test cl, 1
je 0x4a2565
mov eax, dword [esi + 0x15c]
lea edx, [ebp - 0x108]
mov dword [ebp - 0x104], eax
mov dword [ebp - 0x108], 1
jmp 0x4a2567
xor edx, edx
test cl, 2
je 0x4a2588
mov eax, dword [esi + 0x15c]
lea edi, [ebp - 0x20c]
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x20c], 1
xor ecx, ecx
lea eax, [ebp - 0x214]
test ebx, ebx
cmove eax, ecx
push eax
mov eax, dword [esi + 0x15c]
push ecx
push edi
push edx
inc eax
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x4a25cc
push str.Timed_out_waiting_on_socket
push 0xfffffffffffffff7
push esi
call fcn.004b2a70
add esp, 0xc
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00426cb5
mov esp, ebp
pop ebp
ret
jns 0x4a25ef
push str.Error_waiting_on_socket
push 0xfffffffffffffff7
push esi
call fcn.004b2a70
add esp, 0xc
pop edi
pop ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00426cb5
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00426cb5
mov esp, ebp
pop ebp
ret