joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a5c20
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
push ebx
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [eax], ebx
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
test eax, eax
jne 0x4a5db7
push esi
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x4a5da3
push edi
nop dword [eax]
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4a5c7e
lea edx, [eax + 1]
nop word [eax + eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a5c70
sub eax, edx
lea ecx, [eax + 1]
jmp 0x4a5c80
xor ecx, ecx
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], ecx
cmp eax, 2
jne 0x4a5c92
mov eax, 0x10
jmp 0x4a5ca0
cmp eax, 0x17
jne 0x4a5d45
mov eax, 0x1c
cmp dword [esi + 0x18], 0
mov dword [ebp - 4], eax
je 0x4a5d45
mov edx, dword [esi + 0x10]
test edx, edx
je 0x4a5d45
cmp edx, eax
jb 0x4a5d45
add ecx, 0x20
add eax, ecx
push eax
call dword [0x57a348]
mov edi, eax
add esp, 4
test edi, edi
je 0x4a5d95
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 ecx, dword [ebp - 4]
mov dword [edi + 0xc], eax
lea eax, [edi + 0x20]
push ecx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
push dword [esi + 0x18]
push eax
call fcn.004fc8a0
mov edx, dword [ebp - 0xc]
add esp, 0xc
test edx, edx
je 0x4a5d33
mov eax, dword [edi + 0x18]
add eax, dword [ebp - 4]
push edx
mov dword [edi + 0x14], eax
push dword [esi + 0x14]
push eax
call fcn.004fc8a0
add esp, 0xc
mov eax, dword [ebp - 0x10]
test ebx, ebx
cmove ebx, edi
test eax, eax
je 0x4a5d42
mov dword [eax + 0x1c], edi
mov dword [ebp - 0x10], edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x4a5c60
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
pop edi
test eax, eax
je 0x4a5d62
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
test esi, esi
je 0x4a5d9f
test ebx, ebx
je 0x4a5d86
nop word [eax + eax]
mov esi, dword [ebx + 0x1c]
push ebx
call dword [0x57a34c]
add esp, 4
mov ebx, esi
test esi, esi
jne 0x4a5d70
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 8
mov dword [ebp - 8], esi
jmp 0x4a5d53
test ebx, ebx
jne 0x4a5daf
mov esi, 0x2af9
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4a5fd0
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x57a734]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x18]
push eax
push esi
push 2
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x4a6016
push dword [ebp + 0xc]
lea eax, [ebp - 0x18]
push esi
push eax
push 2
call fcn.004a5f00
add esp, 0x10
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x14]
push eax
push esi
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
test eax, eax
jle 0x4a6048
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push esi
push eax
push 0x17
call fcn.004a5f00
add esp, 0x10
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.004e36f8
mov esp, ebp
pop ebp
ret

Function at 0x4a61b0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push 0
call fcn.004fff73
add esp, 0x18
test eax, eax
je 0x4a61d2
cmp eax, 0xffffffff
jne 0x4a61d4
xor eax, eax
pop ebp
ret

Function at 0x4a6220
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov ecx, 0x2b
test edi, edi
je 0x4a62c7
mov esi, dword [ebp + 0xc]
nop dword [eax]
push 4
lea eax, [ebp + 0x10]
mov ebx, 4
push eax
push dword [ebp + 8]
cmp edi, ebx
cmovb ebx, edi
call fcn.0048c470
add esp, 0xc
cmp eax, 4
jne 0x4a6285
cmp byte [0x57fcd0], 0
jne 0x4a6290
push 2
push eax
lea eax, [ebp + 0x10]
mov dword [ebp + 0x10], 0
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
mov ecx, eax
test eax, eax
jne 0x4a62c9
mov eax, dword [ebp + 0x10]
jmp 0x4a62ac
imul eax, dword [0x57fccc], 0x41c64e6d
add eax, 0x3039
mov dword [0x57fccc], eax
rol eax, 0x10
xor ecx, ecx
mov dword [ebp + 0x10], eax
test ebx, ebx
je 0x4a62bf
mov byte [esi], al
dec edi
inc esi
shr eax, 8
sub ebx, 1
jne 0x4a62b0
mov dword [ebp + 0x10], eax
test edi, edi
jne 0x4a6240
mov eax, ecx
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x4a6380
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.004fce20
add esp, 0xc
push 2
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
call sub.bcrypt.dll_BCryptGenRandom
neg eax
sbb eax, eax
and eax, 2
pop ebp
ret
Function at 0x4a8170
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, dword [ebp + 0x14]
push esi
push 0
push dword [ebp + 0x10]
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 4
mov dword [ebp + 0x14], esi
call fcn.004fce20
add esp, 0xc
lea eax, [ebp - 8]
push 0xf0000040
push dword [ebp + 0x18]
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x4a823e
lea eax, [ebp - 4]
push eax
push 0
push 0
push dword [ebp + 0x1c]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x4a8220
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x4a8220
push 0
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
test eax, eax
je 0x4a8220
cmp esi, dword [ebp - 0xc]
jb 0x4a8220
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
mov eax, dword [ebp - 4]
test eax, eax
je 0x4a822e
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [ebp - 8]
test eax, eax
je 0x4a823e
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4a93e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.004a9350

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

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push 0
mov byte [ebp + 0xa], cl
lea ecx, [ebp + 8]
push 3
mov eax, dword [esi + 0xc]
push ecx
mov byte [ebp + 8], 0xff
mov byte [ebp + 9], bl
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4aac48
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004929d0
add esp, 0xc
push dword [ebp + 0x10]
push ebx
push str.SENT
push esi
call fcn.004aa4f0
add esp, 0x10
pop esi
pop ebx
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 0xc], 0x1f
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [eax + 0x124]
mov eax, dword [eax + 0xc]
mov dword [ebp - 4], eax
jne 0x4aaede
push edi
lea eax, [ebx + 0x1cb4]
lea edi, [ebx + 0x1eb4]
mov dword [edi], eax
cmp eax, edi
jae 0x4aadb8
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4aadc3
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4aadce
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 [ebp - 0xc], ax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [edi]
mov word [ebp - 0x14], ax
cmp ecx, edi
jae 0x4aadfe
mov al, byte [ebp - 0xc]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4aae0b
mov al, byte [ebp - 0xb]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4aae18
mov al, byte [ebp - 0x14]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x4aae25
mov al, byte [ebp - 0x13]
mov byte [ecx], al
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4aae30
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4aae3b
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
lea ecx, [ebx + 0x1cb4]
mov esi, dword [ebp + 8]
mov dword [ebx + 0x1eb8], eax
sub eax, ecx
sub eax, 2
mov dword [edi], ecx
push eax
lea eax, [ebx + 0x1cb6]
push eax
push 0x3e
push esi
call fcn.004aa5f0
add esp, 0x10
lea eax, [ebx + 0x1cb4]
push 0
push 3
push eax
mov eax, dword [ebp - 4]
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x4aae9b
call edi
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004929d0
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb7]
push eax
push esi
call fcn.004aac60
add esp, 0xc
lea eax, [ebx + 0x1cbb]
push 0
push 2
push eax
mov eax, dword [ebp - 4]
push dword [eax + 0x120]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4aaedc
call edi
push eax
push str.Sending_data_failed___d_
push esi
call fcn.004929d0
add esp, 0xc
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4abeb0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x57a734]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov eax, dword [ebx + 0xc]
mov edi, dword [eax + 0x378]
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], 0x80
lea eax, [ebp - 0x84]
push eax
mov eax, dword [edi + 0x13c]
push 0
add eax, 4
push eax
push dword [edi + 0x148]
push dword [edi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [edi + 0x130], 0
mov dword [edi + 0x134], eax
jne 0x4abf3c
push dword [ebp - 0x88]
lea eax, [ebp - 0x84]
push eax
lea eax, [edi + 0xb0]
push eax
call fcn.004fc8a0
mov eax, dword [ebp - 0x88]
add esp, 0xc
mov dword [edi + 0x130], eax
mov edx, dword [edi + 0x134]
cmp edx, 4
jge 0x4abf6f
push str.Received_too_short_packet
push ebx
call fcn.004929d0
add esp, 8
mov dword [edi + 0xc], 7
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x148]
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.0x4abf90
jmp dword [ecx*4 + 0x4ac0f0]
cmp edx, 4
jle case.0x4abf90.4
mov eax, dword [edi + 0x148]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [edi + 0x144]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x4abf90.4
lea eax, [edx - 4]
push eax
mov eax, dword [edi + 0x148]
add eax, 4
push eax
push 1
push ebx
call fcn.00492b10
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4ac003
push 5
push edi
call fcn.004ac960
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x134]
sub eax, 4
cdq
add dword [ebx + 0x90], eax
adc dword [ebx + 0x94], edx
push dword [ebx + 0x94]
push dword [ebx + 0x90]
push ebx
call fcn.004a0af0
jmp 0x4ac0ba
mov eax, dword [edi + 0x148]
lea esi, [edx - 4]
add eax, 4
mov dword [ebp - 0x8c], eax
mov eax, dword [edi + 0x148]
push esi
push dword [ebp - 0x8c]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
mov dword [edi + 8], ecx
call fcn.004aca90
add esp, 8
cmp eax, esi
jae case.0x4abf90.4
push dword [ebp - 0x8c]
push str.TFTP_error:__s
push ebx
call fcn.00492a90
jmp 0x4ac0ba
lea eax, [edx - 2]
push eax
mov eax, dword [edi + 0x148]
add eax, 2
push eax
push edi
call fcn.004abc70
add esp, 0xc
test eax, eax
je case.0x4abf90.4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
push str.Internal_error:_Unexpected_packet
push 0x561c90
push ebx
call fcn.004929d0
add esp, 0xc
push ebx
call fcn.004a0e30
add esp, 4
test eax, eax
je 0x4abf5c
push 5
push edi
call fcn.004ac960
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
mov eax, 0x2a
pop edi
pop esi
pop ebx
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
Function at 0x4ac960
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [eax + 0x10]
cmp edx, 3
ja case.default.0x4ac970
jmp dword [edx*4 + 0x4ac9c4]
mov dword [ebp + 8], eax
pop ebp
jmp fcn.004ac420
mov dword [ebp + 8], eax
pop ebp
jmp fcn.004ac100
mov dword [ebp + 8], eax
pop ebp
jmp fcn.004acbc0
push str.TFTP_finished
push 0x561c90
push ecx
call fcn.00492a90
add esp, 0xc
xor eax, eax
pop ebp
ret
push str.Internal_state_machine_error
push 0x561c90
push ecx
call fcn.004929d0
add esp, 0xc
mov eax, 0x47
pop ebp
ret
Function at 0x4b6f20
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x57a734]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x84]
push eax
mov ebx, dword [edi + 0xc]
mov esi, dword [ebx + 0x124]
push esi
mov dword [ebp - 0x88], 0xffffffff
mov dword [ebp - 0x8c], 0x80
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x4b6f96
lea eax, [ebp - 0x8c]
mov dword [ebp - 0x8c], 0x80
push eax
lea eax, [ebp - 0x84]
push eax
push esi
call dword [sym.imp.WS2_32.dll_accept]
mov dword [ebp - 0x88], eax
jmp 0x4b6f9c
mov eax, dword [ebp - 0x88]
cmp eax, 0xffffffff
jne 0x4b6fc5
push str.Error_accept__ing_server_connect
push edi
call fcn.004929d0
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
push str.Connection_accepted_from_server
push edi
call fcn.00492a90
mov byte [ebx + 0x1cd], 0
push 1
push dword [ebp - 0x88]
call fcn.004c91a0
lea eax, [ebp - 0x88]
push eax
push 1
push ebx
push edi
call fcn.004bfc50
add esp, 0x20
test eax, eax
jne 0x4b705e
cmp dword [edi + 0x1ac], eax
je 0x4b705c
push 1
push edi
call fcn.00481750
mov eax, dword [edi + 0x1ac]
push 1
push dword [ebp - 0x88]
push dword [edi + 0x1b0]
call eax
push 0
push edi
mov esi, eax
call fcn.00481750
add esp, 0x1c
test esi, esi
je 0x4b705c
push 1
push edi
call fcn.00492160
push 1
push ebx
push edi
call fcn.00491f80
add esp, 0x14
mov eax, 0x2a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e36f8
mov esp, ebp
pop ebp
ret

Function at 0x4b96b0
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [ecx - 0xc8]
xor edi, edi
mov ebx, dword [esi + 0xc]
cmp eax, 0x64
jb 0x4b96e2
push str.Couldnt_set_desired_mode
push esi
call fcn.004929d0
add esp, 8
lea eax, [edi + 0x11]
pop edi
pop esi
pop ebx
pop ebp
ret
cmp ecx, 0xc8
je 0x4b96f9
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200
push esi
call fcn.00492a90
add esp, 0xc
mov al, byte [ebp + 0x10]
cmp al, 0x13
jne 0x4b9711
push ebx
push esi
call fcn.004b9350
add esp, 8
mov edi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp al, 0x14
jne 0x4b9725
push esi
call fcn.004b8300
add esp, 4
mov edi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp al, 0x15
jne 0x4b973d
push 0xd
push 1
push esi
call fcn.004b8e60
add esp, 0xc
mov edi, eax
pop edi
pop esi
pop ebx
pop ebp
ret
cmp al, 0x16
jne 0x4b9750
push 0xe
push 1
push esi
call fcn.004b8e60
add esp, 0xc
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret
Function at 0x4bc960
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x57a734]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x48], eax
cmp esi, 4
jae 0x4bc998
pop esi
mov eax, 0x16
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
push edi
inc ebx
sub esi, 2
push str.0123456789abcdefABCDEF:.
push ebx
call fcn.00513f50
add esp, 8
cmp esi, eax
je 0x4bca64
mov dword [ebp - 0x50], eax
add eax, ebx
mov dword [ebp - 0x4c], eax
cmp byte [eax], 0x25
jne 0x4bca7d
push 2
lea esi, [eax + 1]
xor edi, edi
push 0x54795c
push esi
call fcn.00511fa0
add esp, 0xc
test eax, eax
jne 0x4bc9ed
mov cl, byte [esi + 2]
lea eax, [esi + 2]
test cl, cl
je 0x4bc9ed
cmp cl, 0x5d
cmovne esi, eax
mov al, byte [esi]
test al, al
je 0x4bca7d
lea ecx, [ebp - 0x14]
sub ecx, esi
nop dword [eax]
cmp al, 0x5d
je 0x4bca15
cmp edi, 0xf
jge 0x4bca15
mov byte [ecx + esi], al
inc edi
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4bca00
test edi, edi
je 0x4bca7d
cmp byte [esi], 0x5d
jne 0x4bca7d
cmp edi, 0x10
jae 0x4bcaef
lea eax, [ebp - 0x14]
mov byte [ebp + edi - 0x14], 0
push eax
call dword [0x57a354]
mov ecx, dword [ebp - 0x48]
add esp, 4
mov dword [ecx + 0x14], eax
test eax, eax
jne 0x4bca59
pop edi
pop esi
mov eax, 7
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x50]
mov word [eax], 0x5d
lea eax, [ebp - 0x14]
mov byte [esi + ebx], 0
push eax
push ebx
lea edi, [esi + ebx]
push 0x17
call dword [sym.imp.WS2_32.dll_inet_pton]
cmp eax, 1
je 0x4bca93
pop edi
pop esi
mov eax, 0x16
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
push 0x2e
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x17
call sub.WS2_32.dll_inet_ntop
test eax, eax
je 0x4bcad9
lea edx, [ebp - 0x44]
lea ecx, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x4bcab0
sub edx, ecx
cmp edx, esi
jae 0x4bcad9
lea ecx, [ebp - 0x44]
mov esi, ebx
mov eax, ecx
sub esi, eax
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x4bcac6
lea edi, [edx + ebx]
mov byte [edi + 1], al
mov ecx, dword [ebp - 4]
xor eax, eax
mov byte [edi], 0x5d
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
call fcn.004e3e42
int3
Function at 0x4be590
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
cmp ebx, 0x20
jbe 0x4be5b4
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.WS2_32.dll_inet_pton]
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
push 2
call esi
cmp eax, 1
jne 0x4be5db
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
push 2
call esi
cmp eax, 1
je 0x4be5e3
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x4be619
cmp ebx, 0x20
je 0x4be619
mov esi, dword [sym.imp.WS2_32.dll_htonl]
push edi
push dword [ebp - 4]
call esi
push dword [ebp - 8]
mov edi, eax
call esi
mov ecx, 0x20
or edx, 0xffffffff
sub ecx, ebx
xor eax, edi
shl edx, cl
pop edi
test edx, eax
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
cmp ecx, dword [ebp - 8]
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4be630
Capabilities:
Convert ip address from string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x57a734]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x28], eax
mov ebx, 0x80
mov eax, dword [ebp + 0x10]
test eax, eax
push esi
mov esi, dword [sym.imp.WS2_32.dll_inet_pton]
cmovne ebx, eax
push edi
lea eax, [ebp - 0x24]
mov edi, ebx
push eax
push ecx
push 0x17
shr edi, 3
and ebx, 7
call esi
cmp eax, 1
jne 0x4be690
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x28]
push 0x17
call esi
cmp eax, 1
jne 0x4be690
cmp edi, 0x10
ja 0x4be690
jne 0x4be6a3
test ebx, ebx
je 0x4be6a7
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x4be6f7
mov esi, edi
lea ecx, [ebp - 0x24]
lea edx, [ebp - 0x14]
sub esi, 4
jb 0x4be6c5
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4be6ca
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4be6b4
cmp esi, 0xfffffffc
je 0x4be6f7
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x4be690
cmp esi, 0xfffffffd
je 0x4be6f7
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x4be690
cmp esi, 0xfffffffe
je 0x4be6f7
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x4be690
cmp esi, 0xffffffff
je 0x4be6f7
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
jne 0x4be690
test ebx, ebx
je 0x4be71d
movzx eax, byte [ebp + edi - 0x24]
mov ecx, 8
movzx edx, byte [ebp + edi - 0x14]
sub ecx, ebx
xor edx, eax
mov eax, 0xff
shl eax, cl
test eax, edx
je 0x4be690
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
Function at 0x4bfe20
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x57fcd4]
mov dword [ebp - 8], 0x4020
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 4
test eax, eax
jne 0x4bfe72
push 3
push 2
push eax
push eax
push 6
call fcn.004c4270
add esp, 0x14
test al, al
je 0x4bfe66
mov dword [0x57fcd4], 2
mov esp, ebp
pop ebp
ret
mov dword [0x57fcd4], 1
jmp 0x4bfe77
cmp eax, 2
je 0x4bfeb7
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4bfe9e
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 8]
jg 0x4bfeb7
push 4
lea eax, [ebp - 8]
push eax
push 0x1001
push 0xffff
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esp, ebp
pop ebp
ret
Function at 0x4c0840
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 8]
push dword [esi + 0x14]
lea eax, [esi + 0x18]
push eax
push dword [esi + 0x98]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4c0880
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [esi + 0xbc]
push eax
push dword [ebp + 0xc]
call fcn.004c0da0
add esp, 0xc
pop edi
pop esi
pop ebp
ret
push dword [ebp + 0xc]
push edi
call fcn.004c0b60
push 1
push dword [esi + 0x98]
call fcn.004c91a0
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x57a734]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x14]
push 0
mov eax, dword [ebx]
push dword [ebp + 0x10]
push ecx
mov eax, dword [eax + 8]
mov dword [edi], 0
push dword [eax + 0x98]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4c0a31
push esi
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x2733
jne 0x4c09fb
pop esi
mov dword [edi], 0x51
or eax, 0xffffffff
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e36f8
mov esp, ebp
pop ebp
ret
push 0x100
lea eax, [ebp - 0x104]
push eax
push esi
call fcn.004a4130
push eax
push str.Recv_failure:__s
push dword [ebx + 4]
call fcn.004929d0
mov eax, dword [ebx + 4]
add esp, 0x18
mov dword [eax + 0x920], esi
or eax, 0xffffffff
mov dword [edi], 0x38
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.004e36f8
mov esp, ebp
pop ebp
ret