joyce8/EMBER2024-capa huggingface dataset:
Function at 0x499eb0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x20c
mov eax, dword [0x737100]
xor eax, esp
mov dword [esp + 0x208], eax
push ebx
push esi
mov esi, dword [esp + 0x218]
push edi
cmp dword [esi + 0x2f8], 3
jne 0x49a0ea
cmp byte [esi + 0x516], 0
jne 0x49a0ea
cmp byte [esi + 0x529], 0
jne 0x49a0ea
mov edi, dword [esp + 0x220]
lea eax, [esp + 0xc]
mov ebx, dword [esi]
push eax
lea eax, [esp + 0x98]
mov dword [esp + 0x10], 0x80
push eax
push edi
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x499f61
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x114]
push 0x100
push eax
push esi
call fcn.004c58d0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push ebx
call fcn.00498730
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004815ec
add esp, 0x20c
ret
push 0x80
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0x80
push 0
push eax
call fcn.004ded70
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x499fd5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [esp + 0x114]
push 0x100
push eax
push esi
call fcn.004c58d0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push ebx
call fcn.00498730
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004815ec
add esp, 0x20c
ret
lea eax, [esi + 0x3a0]
push eax
lea edi, [esi + 0x372]
push edi
push dword [esp + 0x14]
lea eax, [esp + 0xa0]
push eax
call fcn.004990e0
add esp, 0x10
test al, al
jne 0x49a046
call fcn.004ed90f
mov esi, eax
call fcn.004ed90f
mov edi, eax
lea eax, [esp + 0x114]
push 0x100
push eax
push dword [esi]
call fcn.004c58d0
push eax
push dword [edi]
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00498730
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004815ec
add esp, 0x20c
ret
movups xmm0, xmmword [edi]
mov eax, dword [edi + 0x28]
movups xmmword [esi + 0x2c4], xmm0
movups xmm0, xmmword [edi + 0x10]
movups xmmword [esi + 0x2d4], xmm0
movq xmm0, qword [edi + 0x20]
movq qword [esi + 0x2e4], xmm0
mov dword [esi + 0x2ec], eax
mov ax, word [edi + 0x2c]
mov word [esi + 0x2f0], ax
lea eax, [esi + 0x3d4]
push eax
lea eax, [esi + 0x3a4]
push eax
push dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
call fcn.004990e0
add esp, 0x10
test al, al
jne 0x49a0ea
call fcn.004ed90f
mov esi, eax
call fcn.004ed90f
mov edi, eax
lea eax, [esp + 0x114]
push 0x100
push eax
push dword [esi]
call fcn.004c58d0
push eax
push dword [edi]
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push ebx
call fcn.00498730
add esp, 0x1c
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x208]
xor ecx, esp
call fcn.004815ec
add esp, 0x20c
ret
push esi
call fcn.00499af0
mov ecx, dword [esp + 0x218]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004815ec
add esp, 0x20c
ret
Function at 0x49b080
Capabilities:
Get common file path

Disassembly:
push ecx
push ebx
push edi
push 0x6a2044
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
test ebx, ebx
jne 0x49b09a
pop edi
pop ebx
pop ecx
ret
push ebp
push esi
push 0x6a2058
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, dword [esp + 0x18]
mov ebp, eax
push 0x6a2068
push esi
call fcn.00524f67
add esp, 8
test eax, eax
je 0x49b0e2
test ebp, ebp
je 0x49b0d3
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_LoadLibraryW]
pop esi
pop ebp
mov edi, eax
pop edi
pop ebx
pop ecx
ret
test ebp, ebp
je 0x49b108
push str.AddDllDirectory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x49b108
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_GetSystemDirectoryW]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x49b1d7
mov ecx, esi
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49b125
sub ecx, ebx
sar ecx, 1
lea eax, [ecx + edx]
lea eax, [eax*2 + 2]
push eax
call dword [0x737170]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x49b1cd
push dword [esp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x49b1cd
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49b166
sub ecx, edx
sar ecx, 1
mov dword [ebx + ecx*2], 0x5c
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x49b181
sub ecx, edx
sar ecx, 1
lea ecx, [ebx + ecx*2]
sub ecx, esi
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x49b195
test ebp, ebp
je 0x49b1c4
push 8
push 0
push ebx
call ebp
push ebx
mov edi, eax
call dword [0x737174]
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_LoadLibraryW]
mov edi, eax
push ebx
call dword [0x737174]
add esp, 4
pop esi
pop ebp
mov eax, edi
pop edi
pop ebx
pop ecx
ret
Function at 0x49fbb0
Capabilities:
Create udp socket

Disassembly:
mov eax, dword [esp + 4]
cmp dword [eax + 0x568], 2
jne 0x49fbc6
mov dword [esp + 4], eax
jmp fcn.0049fb60
mov al, 1
ret

Function at 0x4a05a0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esp + 4]
cmp byte [eax + 0x52d], 0
je 0x4a05b6
mov dword [esp + 4], eax
jmp fcn.004c7cd0
mov dword [esp + 4], eax
jmp fcn.0048dbc0
Function at 0x4a5680
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, 0x34
mov eax, dword [0x737100]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
mov ebx, dword [esp + 0x48]
push esi
mov esi, dword [sym.imp.WS2_32.dll_socket]
push edi
push 6
push 1
push 2
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x18], 1
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x4a5865
xorps xmm0, xmm0
mov eax, 2
movups xmmword [esp + 0x14], xmm0
push 0x7f000001
mov word [esp + 0x18], ax
call dword [sym.imp.WS2_32.dll_htonl]
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 0x4a5853
push 0x10
lea eax, [esp + 0x18]
push eax
push edi
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x4a5853
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 0x4a5853
push 1
push edi
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x4a5853
push 0
push 1
push 2
call esi
mov dword [ebx], eax
cmp eax, 0xffffffff
je 0x4a5853
push 0x10
lea ecx, [esp + 0x18]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4a5853
push 0
push 0
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebx + 4], eax
cmp eax, 0xffffffff
je 0x4a5853
push ebx
push 0x6a3978
lea eax, [esp + 0x2c]
push 0xc
push eax
call fcn.004a85d0
lea esi, [esp + 0x34]
add esp, 0x10
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4a57b1
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 0x4a5853
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 0x4a5853
lea ecx, [esp + 0x24]
lea edx, [esp + 0x30]
sub esi, 4
jb 0x4a5806
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4a580b
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4a57f5
cmp esi, 0xfffffffc
je 0x4a5838
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x4a5853
cmp esi, 0xfffffffd
je 0x4a5838
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x4a5853
cmp esi, 0xfffffffe
je 0x4a5838
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x4a5853
cmp esi, 0xffffffff
je 0x4a5838
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x4a5853
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.004815ec
add esp, 0x34
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
mov ecx, dword [esp + 0x3c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004815ec
add esp, 0x34
ret
Function at 0x4aabe0
Capabilities:
Resolve dns

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x20]
push ebx
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov dword [eax], ebx
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push dword [esp + 0x24]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [esp + 4], eax
test eax, eax
jne 0x4aad71
push esi
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4aad5c
push ebp
push edi
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4aac3e
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4aac30
sub eax, edx
lea ecx, [eax + 1]
jmp 0x4aac40
xor ecx, ecx
mov eax, dword [esi + 4]
mov dword [esp + 0x14], ecx
cmp eax, 2
jne 0x4aac51
lea ebp, [eax + 0xe]
jmp 0x4aac5d
cmp eax, 0x17
jne 0x4aacfe
lea ebp, [eax + 5]
cmp dword [esi + 0x18], 0
je 0x4aacfe
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4aacfe
cmp eax, ebp
jb 0x4aacfe
lea eax, [ecx + 0x20]
add eax, ebp
push eax
call dword [0x737170]
mov edi, eax
add esp, 4
test edi, edi
je 0x4aad4d
mov ecx, dword [esi]
mov dword [edi], ecx
mov ecx, dword [esi + 4]
mov dword [edi + 4], ecx
mov ecx, dword [esi + 8]
mov dword [edi + 8], ecx
mov eax, dword [esi + 0xc]
mov dword [edi + 0xc], eax
lea eax, [edi + 0x20]
push ebp
mov dword [edi + 0x10], ebp
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
push dword [esi + 0x18]
push eax
call fcn.004de1b0
mov ecx, dword [esp + 0x20]
add esp, 0xc
test ecx, ecx
je 0x4aacea
mov eax, dword [edi + 0x18]
add eax, ebp
push ecx
mov dword [edi + 0x14], eax
push dword [esi + 0x14]
push eax
call fcn.004de1b0
add esp, 0xc
mov eax, dword [esp + 0x18]
test ebx, ebx
cmove ebx, edi
test eax, eax
je 0x4aacfa
mov dword [eax + 0x1c], edi
mov dword [esp + 0x18], edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4aac22
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
pop edi
pop ebp
test eax, eax
je 0x4aad1e
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x4aad58
test ebx, ebx
je 0x4aad3d
mov esi, dword [ebx + 0x1c]
push ebx
call dword [0x737174]
add esp, 4
mov ebx, esi
test esi, esi
jne 0x4aad26
mov esi, dword [esp + 8]
mov eax, dword [esp + 0x28]
xor ebx, ebx
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret
mov esi, 8
mov dword [esp + 0x10], esi
jmp 0x4aad0d
test ebx, ebx
jne 0x4aad68
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [esp + 0x28]
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
add esp, 0x10
ret
Function at 0x4aba60
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x1cc
mov eax, dword [0x737100]
xor eax, esp
mov dword [esp + 0x1c8], eax
cmp byte [0x73dfc8], 0
push ebx
mov ebx, dword [esp + 0x1d4]
mov dword [esp + 0x18], ebx
jne 0x4aba99
call fcn.0059c520
test eax, eax
je 0x4abab1
mov byte [0x73dfc8], 1
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c8]
xor ecx, esp
call fcn.004815ec
add esp, 0x1cc
ret
mov eax, dword [ebx + 0xa00]
test eax, eax
je 0x4abad2
push 0x400
push eax
call fcn.0059d0b0
add esp, 8
call fcn.0059c520
test eax, eax
jne 0x4aba99
push ebp
push esi
push edi
nop word [eax + eax]
mov esi, 2
mov dword [esp + 0x18], 4
lea eax, [esp + 0x98]
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], eax
nop dword [eax]
lea eax, [esp + 0x48]
push eax
call fcn.0049f330
push 0
push 1
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x44], xmm0
movups xmmword [esp + 0x34], xmm0
call fcn.004a7120
movups xmm1, xmmword [esp + 0x44]
add esp, 0xc
lea ecx, [esi - 1]
movaps xmm0, xmm1
psrldq xmm0, 4
movd eax, xmm0
push eax
movd eax, xmm1
push eax
push 0
push ecx
call fcn.004827a0
imul esi, dword [esp + 0x30]
mov ebx, eax
lea eax, [esp + 0x58]
mov ebp, edx
push eax
mov dword [esp + 0x20], esi
call fcn.0049f330
mov eax, dword [eax + 8]
cdq
mov esi, eax
mov edi, edx
lea eax, [esp + 0x6c]
push eax
call fcn.0049f330
mov edx, dword [esp + 0x18]
add esp, 8
inc edx
mov dword [esp + 0x20], edx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
add ecx, esi
push 0
push edx
adc eax, edi
push eax
push ecx
call fcn.004827a0
shld edx, eax, 8
shl eax, 8
xor ebp, edx
xor ebx, eax
mov dword [esp + 0x2c], ebp
lea eax, [esp + 0x78]
mov dword [esp + 0x28], ebx
push eax
call fcn.0049f330
lea esi, [eax + 8]
lea eax, [esp + 0x8c]
push eax
call fcn.0049f330
add esp, 8
mov ecx, dword [eax]
add ecx, dword [esi]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
add eax, 2
imul ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], esi
shl ecx, 0x10
xor eax, ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x14]
movups xmm0, xmmword [esp + 0x28]
movups xmmword [eax], xmm0
add eax, 0x10
sub dword [esp + 0x18], 1
mov dword [esp + 0x14], eax
jne 0x4abb00
movsd xmm0, qword [0x6a6180]
lea eax, [esp + 0x98]
sub esp, 8
movsd qword [esp], xmm0
push 0x40
push eax
call fcn.0059c160
add esp, 0x10
call fcn.0059c520
test eax, eax
je 0x4abae0
lea eax, [esp + 0xd8]
mov byte [esp + 0xd8], 0
push 0x100
push eax
call fcn.0059cef0
add esp, 8
cmp byte [esp + 0xd8], 0
pop edi
pop esi
pop ebp
je 0x4abc79
lea eax, [esp + 0xcc]
push 0x400
push eax
call fcn.0059d0b0
add esp, 8
call fcn.0059c520
test eax, eax
jne 0x4aba99
push str.libcurl_is_now_using_a_weak_random_seed__n
push dword [esp + 0x1c]
call fcn.00498810
add esp, 8
call fcn.0059c520
mov ecx, dword [esp + 0x1cc]
neg eax
pop ebx
sbb eax, eax
xor ecx, esp
and eax, 0xffffffdd
add eax, 0x23
call fcn.004815ec
add esp, 0x1cc
ret
Function at 0x4b0970
Capabilities:
Query environment variable

Disassembly:
push ebx
push ebp
xor ebp, ebp
push esi
push edi
lea esi, [ebp + 1]
push esi
push ebp
call dword [0x737178]
mov edi, eax
add esp, 8
test edi, edi
je 0x4b0947
nop word [eax + eax]
push esi
push edi
push dword [esp + 0x1c]
mov ebp, edi
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, eax
test esi, esi
je 0x4b095f
cmp esi, ebx
je 0x4b095f
cmp esi, 0x8000
ja 0x4b095f
cmp esi, ebx
jb 0x4b0958
push esi
push edi
call dword [0x737178]
mov edi, eax
add esp, 8
test edi, edi
jne 0x4b0910
push ebp
call dword [0x737174]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call dword [0x737174]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
jmp 0x4b08f0

Function at 0x4b2fe0
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x737100]
xor eax, esp
mov dword [esp + 0x190], eax
push esi
mov esi, dword [esp + 0x19c]
lea eax, [esp + 4]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4b301e
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.00498730
add esp, 0xc
jmp 0x4b3059
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp + 4]
cmp al, 2
jne 0x4b304b
shr eax, 8
test al, al
jne 0x4b304b
xor eax, eax
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004815ec
add esp, 0x194
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.00498730
add esp, 8
mov ecx, dword [esp + 0x194]
mov eax, 2
pop esi
xor ecx, esp
call fcn.004815ec
add esp, 0x194
ret

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

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
mov byte [esp + 0x16], al
lea eax, [esp + 0x14]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x420]
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4b394c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.00498730
add esp, 0xc
push dword [esp + 0x18]
push ebx
push str.SENT
push dword [esi]
call fcn.004b3200
add esp, 0x10
pop edi
pop esi
pop ebx
ret
Function at 0x4b3a90
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x14
cmp dword [esp + 0x1c], 0x1f
mov eax, dword [esp + 0x18]
push ebx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov ebx, dword [eax + 0x138]
jne 0x4b3be9
push ebp
push edi
lea ebp, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], ebp
cmp ebp, edi
jae 0x4b3ac9
mov byte [ebp], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b3ad4
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b3adf
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
mov word [esp + 0x14], ax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [edi]
mov word [esp + 0x1c], ax
cmp ecx, edi
jae 0x4b3b12
mov al, byte [esp + 0x14]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4b3b20
mov al, byte [esp + 0x15]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4b3b2e
mov al, byte [esp + 0x1c]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4b3b3c
mov al, byte [esp + 0x1d]
mov byte [ecx], al
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b3b47
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4b3b52
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
mov esi, dword [esp + 0x10]
mov dword [ebx + 0x1eb4], eax
sub eax, ebp
sub eax, 2
mov dword [edi], ebp
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push esi
call fcn.004b3310
mov edi, dword [esp + 0x38]
add esp, 0x10
push 0
push 3
push ebp
push dword [edi + 0x420]
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x4b3ba8
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00498730
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push edi
call fcn.004b3970
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [edi + 0x420]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4b3be6
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.00498730
add esp, 0xc
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x4b4e70
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x8c
mov eax, dword [0x737100]
xor eax, esp
mov dword [esp + 0x88], eax
mov eax, dword [esp + 0x90]
push ebx
push ebp
push esi
mov ebx, dword [eax]
push edi
mov edi, dword [eax + 0x720]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0x80
lea eax, [esp + 0x1c]
push eax
mov eax, dword [edi + 0x154]
push 0
add eax, 4
push eax
push dword [edi + 0x15c]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x148], 0
mov dword [edi + 0x14c], eax
jne 0x4b4ef9
push dword [esp + 0x14]
lea eax, [esp + 0x1c]
push eax
lea eax, [edi + 0xc8]
push eax
call fcn.004de1b0
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [edi + 0x148], eax
mov edx, dword [edi + 0x14c]
cmp edx, 4
jge 0x4b4f34
push str.Received_too_short_packet
push ebx
call fcn.00498730
add esp, 8
mov dword [edi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x98]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004815ec
add esp, 0x8c
ret
mov eax, dword [edi + 0x15c]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
mov dword [edi + 0xc], ecx
add ecx, 0xfffffffd
cmp ecx, 3
ja case.default.0x4b4f55
jmp dword [ecx*4 + 0x4b5088]
cmp edx, 4
jle case.0x4b4f55.4
mov eax, dword [edi + 0x15c]
mov ebp, dword [esp + 0x10]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x40]
inc eax
movzx eax, ax
cmp eax, ecx
jne 0x4b505f
lea eax, [edx - 4]
push eax
mov eax, dword [edi + 0x15c]
add eax, 4
push eax
push 1
push ebp
call fcn.00498670
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4b4fbd
push 5
push edi
call fcn.004b5930
add esp, 8
mov eax, esi
jmp 0x4b4f1b
mov eax, dword [edi + 0x14c]
sub eax, 4
cdq
add dword [ebx + 0x98], eax
adc dword [ebx + 0x9c], edx
push dword [ebx + 0x9c]
push dword [ebx + 0x98]
push ebx
call fcn.004a5a30
add esp, 0xc
jmp 0x4b505f
mov eax, dword [edi + 0x15c]
lea esi, [edx - 4]
mov ebp, dword [edi + 0x15c]
add ebp, 4
push esi
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
push ebp
mov dword [edi + 8], ecx
call fcn.004b49b0
add esp, 8
cmp eax, esi
jae case.0x4b4f55.4
push ebp
push str.TFTP_error:__s_n
push ebx
call fcn.00498810
jmp 0x4b5058
lea eax, [edx - 2]
push eax
mov eax, dword [edi + 0x15c]
add eax, 2
push eax
push edi
call fcn.004b4bc0
add esp, 0xc
test eax, eax
je case.0x4b4f55.4
jmp 0x4b4f1b
push str.Internal_error:_Unexpected_packet
push 0x6a5d48
push ebx
call fcn.00498730
add esp, 0xc
mov ebp, dword [esp + 0x10]
push ebp
call fcn.004a5d20
add esp, 4
test eax, eax
je 0x4b4f19
push 5
push edi
call fcn.004b5930
add esp, 8
mov eax, 0x2a
jmp 0x4b4f1b
Function at 0x4bcaa0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x88
mov eax, dword [0x737100]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x9c]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0x80
push eax
mov ebp, dword [edi + 0x424]
or esi, 0xffffffff
mov ebx, dword [edi]
push ebp
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4bcb02
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.00499170
add esp, 8
cmp esi, 0xffffffff
jne 0x4bcb26
push str.Error_accept__ing_server_connect
push ebx
call fcn.00498730
add esp, 8
mov eax, 0x1e
jmp 0x4bcb95
push str.Connection_accepted_from_server_n
push ebx
call fcn.00498810
push 1
mov byte [edi + 0x51e], 0
push esi
mov dword [edi + 0x424], esi
call fcn.004a5880
add esp, 0x10
mov byte [edi + 0x530], 1
cmp dword [ebx + 0x608], 0
je 0x4bcb93
push 1
push ebx
call fcn.00488950
mov eax, dword [ebx + 0x608]
push 1
push esi
push dword [ebx + 0x60c]
call eax
push 0
push ebx
mov esi, eax
call fcn.00488950
add esp, 0x1c
test esi, esi
je 0x4bcb93
push edi
call fcn.004bd180
add esp, 4
mov eax, 0x2a
jmp 0x4bcb95
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004815ec
add esp, 0x88
ret