joyce8/EMBER2024-capa huggingface dataset:
Function at 0x411990
Capabilities:
Check http status code

Disassembly:
mov ecx, dword [esp + 8]
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
xor esi, esi
shr eax, 0x1f
mov ebx, dword [edi]
add edx, eax
cmp edx, 2
je 0x4119cc
push str.Couldnt_set_desired_mode
push ebx
call fcn.0040dc60
add esp, 8
mov eax, 0x11
pop edi
pop esi
pop ebx
ret
cmp ecx, 0xc8
je 0x4119e3
push ecx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ebx
call fcn.0040dbf0
add esp, 0xc
mov eax, dword [esp + 0x18]
cmp eax, 0x10
jne 0x4119fb
push edi
call fcn.00410b50
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x11
jne 0x411a0f
push edi
call fcn.00411a40
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x12
jne 0x411a23
push edi
call fcn.00411a90
add esp, 4
mov esi, eax
pop edi
pop esi
pop ebx
ret
cmp eax, 0x13
jne 0x411a33
push edi
call fcn.00411ab0
add esp, 4
mov esi, eax
mov eax, esi
pop edi
pop esi
pop ebx
ret

Function at 0x411eb0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
mov esi, dword [ebp]
mov edi, dword [ebp + 0xa4]
call fcn.0040eb40
push edx
push eax
call fcn.0040eb40
push edx
push eax
call fcn.0040eba0
mov ecx, eax
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
add esp, 0x10
shr eax, 0x1f
add edx, eax
mov eax, dword [esi + 0x9c]
test eax, eax
jne 0x411f01
mov eax, dword [esi + 0x98]
test eax, eax
je 0x411f22
sub eax, edx
test eax, eax
jg 0x411f27
push str.Timed_out_before_server_could_connect_to_us
push esi
call fcn.0040dc60
add esp, 8
mov eax, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov eax, 0x3c
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
shl ecx, 3
push ecx
push 0xffffffffffffffff
push edi
call fcn.00419770
add esp, 0xc
cmp eax, 0xffffffff
je 0x411fbb
test eax, eax
je 0x411fb4
lea edx, [esp + 0x24]
lea eax, [esp + 0x10]
push edx
push eax
push edi
or ebx, 0xffffffff
mov dword [esp + 0x30], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x411f7b
lea ecx, [esp + 0x24]
lea edx, [esp + 0x10]
push ecx
push edx
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov ebx, eax
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
cmp ebx, 0xffffffff
jne 0x411f8e
push str.Error_accept__ing_server_connect
jmp 0x411fc0
push str.Connection_accepted_from_server_n
push esi
call fcn.0040dbf0
push 1
push ebx
mov dword [ebp + 0xa4], ebx
call fcn.00419930
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
push str.Timeout_while_waiting_for_server_connect
jmp 0x411fc0
push str.Error_while_waiting_for_server_connect
push esi
call fcn.0040dc60
add esp, 8
mov eax, 0x1e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x414050
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 0xc], str.octet
mov eax, dword [esi + 0xc]
mov ebp, dword [eax]
mov ebx, dword [eax + 0x50]
mov al, byte [ebp + 0x188]
test al, al
je 0x41407a
mov dword [esp + 0xc], str.netascii
mov eax, dword [esp + 0x18]
cmp eax, 6
ja case.0x414087.1
jmp dword [eax*4 + 0x414218]
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
inc edx
mov eax, edx
mov dword [esi + 0x14], edx
cmp eax, ecx
jle 0x4140b0
mov dword [esi + 8], 9
mov dword [esi], 3
pop esi
pop ebp
pop ebx
pop ecx
ret
mov al, byte [ebp + 0x195]
push edi
test al, al
je 0x414113
push 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 0x348], ax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebx
call sym.SportLauncher.exe_curl_unescape
mov ecx, dword [esi + 0xc]
mov ebx, eax
lea eax, [esi + 0x34c]
add esp, 8
mov dword [ecx + 0x1fc], eax
mov eax, dword [ebp + 0xa8]
mov ecx, dword [ebp + 0xac]
mov edx, eax
and edx, ecx
cmp edx, 0xffffffff
je 0x414122
push ecx
push eax
push ebp
call fcn.0040ee60
add esp, 0xc
jmp 0x414122
push 1
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 0x348], ax
mov eax, dword [esp + 0x10]
push 0
push eax
push 0
push ebx
lea ecx, [esi + 0x34a]
push str._s_c_s_c
push ecx
call sym.SportLauncher.exe_curl_msprintf
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x10]
not ecx
dec ecx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esi + 0xc]
not ecx
mov eax, dword [eax + 0x10]
dec ecx
lea ecx, [edx + ecx + 4]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
push edx
push eax
push 0
push ecx
mov ecx, dword [esi + 0x10]
lea eax, [esi + 0x348]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
pop edi
jge 0x414210
call fcn.00420abd
mov edx, dword [eax]
push edx
call fcn.004214db
push eax
push 0x44107c
push ebp
call fcn.0040dc60
add esp, 0x10
pop esi
pop ebp
pop ebx
pop ecx
ret
push str.Connected_for_transmit
push 0x44107c
push ebp
call fcn.0040dbf0
push esi
mov dword [esi], 2
call fcn.00413b20
push 4
push esi
call fcn.00414400
add esp, 0x18
pop esi
pop ebp
pop ebx
pop ecx
ret
push str.Connected_for_receive
push 0x44107c
push ebp
call fcn.0040dbf0
push esi
mov dword [esi], 1
call fcn.00413b20
push 3
push esi
call fcn.00414240
add esp, 0x18
pop esi
pop ebp
pop ebx
pop ecx
ret
push str.tftp_send_first:_internal_error_n
push ebp
call fcn.0040dc60
add esp, 8
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x414240
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
push edi
mov eax, dword [esi + 0xc]
mov ebp, dword [eax]
mov eax, dword [esp + 0x14]
sub eax, 3
je 0x4142f7
sub eax, 2
je 0x4142a0
dec eax
je 0x414279
push str.tftp_rx:_internal_error
push 0x44107c
push ebp
call fcn.0040dc60
add esp, 0xc
jmp 0x4143d5
mov eax, dword [esi + 0x14]
inc eax
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebp
mov dword [esi + 0x14], eax
call fcn.0040dbf0
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
add esp, 0xc
cmp ecx, eax
jle 0x4142ab
mov dword [esi + 8], 8
mov dword [esi], 3
jmp 0x4143d5
mov edx, dword [esi + 0x138]
lea eax, [esi + 0xb8]
push edx
mov edx, dword [esi + 0x10]
push eax
push 0
lea ecx, [esi + 0x348]
push 4
push ecx
push edx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x4143d5
call fcn.00420abd
mov eax, dword [eax]
push eax
call fcn.004214db
push eax
push 0x44107c
push ebp
call fcn.0040dc60
add esp, 0x10
jmp 0x4143d5
mov cx, word [esi + 0x146]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
xor edx, edx
mov di, ax
mov dx, word [esi + 0x28]
and edi, 0xffff
inc edx
cmp edx, edi
je 0x414352
push edi
push str.Received_unexpected_DATA_packet_block__d_n
push ebp
call fcn.0040dbf0
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
add esp, 0xc
inc edx
mov eax, edx
mov dword [esi + 0x14], edx
cmp eax, ecx
jle 0x414352
xor eax, eax
mov ax, word [esi + 0x28]
inc eax
push eax
push str.tftp_rx:_giving_up_waiting_for_block__d_n
push ebp
call fcn.0040dc60
add esp, 0xc
pop edi
pop esi
pop ebp
ret
push ebx
mov ebx, dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 0x28], di
push 4
mov dword [esi + 0x14], 0
lea edi, [esi + 0x348]
call ebx
mov cx, word [esi + 0x28]
mov word [edi], ax
push ecx
call ebx
mov edx, dword [esi + 0x138]
mov ecx, dword [esi + 0x10]
mov word [esi + 0x34a], ax
lea eax, [esi + 0xb8]
push edx
push eax
push 0
push 4
push edi
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x4143bc
call fcn.00420abd
mov edx, dword [eax]
push edx
call fcn.004214db
push eax
push 0x44107c
push ebp
call fcn.0040dc60
add esp, 0x10
mov ebx, dword [esi + 0x13c]
xor eax, eax
cmp ebx, 0x204
pop ebx
setge al
dec eax
and eax, 2
inc eax
mov dword [esi], eax
xor eax, eax
push 0
mov ax, word [esi + 0x28]
push 0x200
cdq
push edx
push eax
call fcn.00421190
push edx
push eax
push ebp
call fcn.0040ede0
add esp, 0xc
pop edi
pop esi
pop ebp
ret
Function at 0x414400
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
mov eax, dword [esi + 0xc]
mov ebp, dword [eax]
mov eax, dword [esp + 0x18]
sub eax, 4
je 0x4144a2
dec eax
je 0x41445f
dec eax
je 0x414438
push str.tftp_tx:_internal_error
push 0x44107c
push ebp
call fcn.0040dc60
add esp, 0xc
jmp 0x4145ac
mov eax, dword [esi + 0x14]
inc eax
push eax
push str.Timeout_waiting_for_block__d_ACK.__Retries___d_n
push ebp
mov dword [esi + 0x14], eax
call fcn.0040dbf0
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
add esp, 0xc
cmp ecx, eax
jle 0x41446a
mov dword [esi + 8], 8
mov dword [esi], 3
jmp 0x4145ac
mov edx, dword [esi + 0x138]
mov ecx, dword [esi + 0x140]
lea eax, [esi + 0xb8]
push edx
push eax
mov eax, dword [esi + 0x10]
add ecx, 4
push 0
lea edx, [esi + 0x348]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x4145ac
jmp 0x414590
mov dx, word [esi + 0x146]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
mov dx, word [esi + 0x28]
and eax, 0xffff
mov ecx, edx
and ecx, 0xffff
cmp eax, ecx
je 0x414508
push ecx
push eax
push str.Received_ACK_for_block__d__expecting__d_n
push ebp
call fcn.0040dbf0
mov edx, dword [esi + 0x14]
mov ecx, dword [esi + 0x1c]
add esp, 0x10
inc edx
mov eax, edx
mov dword [esi + 0x14], edx
cmp eax, ecx
jle 0x4145cc
xor eax, eax
mov ax, word [esi + 0x28]
push eax
push str.tftp_tx:_giving_up_waiting_for_block__d_ack
push 0x44107c
push ebp
call fcn.0040dc60
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [sym.imp.WS2_32.dll_htons]
inc edx
push 3
mov word [esi + 0x28], dx
mov dword [esi + 0x14], 0
lea ebx, [esi + 0x348]
call edi
mov cx, word [esi + 0x28]
mov word [ebx], ax
push ecx
call edi
cmp word [esi + 0x28], 1
mov word [esi + 0x34a], ax
jbe 0x414553
cmp dword [esi + 0x140], 0x200
jge 0x414553
mov dword [esi], 3
pop edi
pop esi
pop ebp
pop ebx
ret
mov edx, dword [esi + 0xc]
lea edi, [esi + 0x140]
push edi
push 0x200
push edx
call fcn.004072f0
mov eax, dword [esi + 0x138]
mov edx, dword [edi]
add esp, 0xc
lea ecx, [esi + 0xb8]
add edx, 4
push eax
mov eax, dword [esi + 0x10]
push ecx
push 0
push edx
push ebx
push eax
call dword [sym.imp.WS2_32.dll_sendto]
test eax, eax
jge 0x4145ac
call fcn.00420abd
mov ecx, dword [eax]
push ecx
call fcn.004214db
push eax
push 0x44107c
push ebp
call fcn.0040dc60
add esp, 0x10
xor eax, eax
push 0
mov ax, word [esi + 0x28]
push 0x200
cdq
push edx
push eax
call fcn.00421190
push edx
push eax
push ebp
call fcn.0040ee00
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x415d50
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x415d89
mov ecx, dword [esp + 0x194]
push eax
push str.WSAStartup_failed___d_
push ecx
call fcn.0040dc60
add esp, 0xc
mov eax, 2
add esp, 0x190
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ax, word [esp]
cmp al, 2
jne 0x415da9
xor edx, edx
mov dl, ah
test dl, dl
jne 0x415da9
xor eax, eax
add esp, 0x190
ret
mov eax, dword [esp + 0x194]
push str.insufficient_winsock_version_to_support_telnet
push eax
call fcn.0040dc60
add esp, 8
mov eax, 2
add esp, 0x190
ret

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

Disassembly:
push ecx
mov al, byte [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0x10]
push 0
lea ecx, [esp + 0xc]
push 3
mov edx, dword [esi + 0xa0]
push ecx
push edx
mov byte [esp + 0x18], 0xff
mov byte [esp + 0x19], bl
mov byte [esp + 0x1a], al
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [esp + 0x18]
mov ecx, dword [esi]
push eax
push ebx
push str.SENT
push ecx
call fcn.00415f70
add esp, 0x10
pop esi
pop ebx
pop ecx
ret
Function at 0x416960
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x904
push ebx
push ebp
mov ebp, dword [esp + 0x910]
push esi
push edi
mov edi, dword [ebp + 0x16c]
mov ebx, dword [ebp]
mov dword [esp + 0x10], ebx
mov eax, dword [edi + 0x1ab0]
mov esi, dword [edi + 0x1aac]
sub eax, esi
lea ecx, [edi + 0x18ac]
add eax, 2
push eax
push ecx
push 0x3c
push ebx
call fcn.00416bd0
mov eax, dword [edi + 0x1aac]
xor ecx, ecx
add esp, 0x10
mov cl, byte [eax]
inc eax
cmp ecx, 0x18
mov dword [edi + 0x1aac], eax
je 0x416b42
cmp ecx, 0x23
je 0x416ad3
cmp ecx, 0x27
jne 0x416bba
push 0
push ecx
push 0xfa
push 0xff
push str._c_c_c_c
lea edx, [esp + 0x128]
push 0x800
push edx
call sym.SportLauncher.exe_curl_msnprintf
mov ebx, dword [edi + 0x18a8]
add esp, 0x1c
test ebx, ebx
mov esi, 4
je 0x416a6b
mov edx, dword [ebx]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea edi, [ecx + esi]
cmp edi, 0x7fa
jae 0x416a64
lea eax, [esp + 0x14]
lea ecx, [esp + 0x94]
push eax
push ecx
push str._127_____127s
push edx
call fcn.004208fd
lea edx, [esp + 0x24]
lea eax, [esp + 0xa4]
push edx
push 1
mov ecx, 0x800
push eax
push 0
sub ecx, esi
push str._c_s_c_s
lea edx, [esp + esi + 0x138]
push ecx
push edx
call sym.SportLauncher.exe_curl_msnprintf
add esp, 0x2c
mov esi, edi
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x416a04
mov eax, 0x800
push 0xf0
push 0xff
sub eax, esi
push 0x442b7c
lea ecx, [esp + esi + 0x120]
push eax
push ecx
call sym.SportLauncher.exe_curl_msnprintf
mov eax, dword [ebp + 0xa0]
add esp, 0x14
add esi, 2
lea edx, [esp + 0x114]
push 0
push esi
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov edx, dword [esp + 0x10]
add esi, 0xfffffffe
lea ecx, [esp + 0x116]
push esi
push ecx
push 0x3e
push edx
call fcn.00416bd0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x904
ret
lea edx, [edi + 0x1828]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
push 0xf0
push 0xff
push edx
push eax
not ecx
push 0x23
push 0xfa
dec ecx
push 0xff
push str._c_c_c_c_s_c_c
lea eax, [esp + 0x134]
mov esi, ecx
push 0x800
push eax
add esi, 6
call sym.SportLauncher.exe_curl_msnprintf
mov edx, dword [ebp + 0xa0]
add esp, 0x28
lea ecx, [esp + 0x114]
push 0
push esi
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
add esi, 0xfffffffe
lea eax, [esp + 0x116]
push esi
push eax
jmp 0x416baf
lea edx, [edi + 0x1808]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
push 0xf0
push 0xff
not ecx
push edx
push eax
dec ecx
push 0x18
push 0xfa
mov esi, ecx
push 0xff
push str._c_c_c_c_s_c_c
lea ecx, [esp + 0x134]
push 0x800
push ecx
add esi, 6
call sym.SportLauncher.exe_curl_msnprintf
mov eax, dword [ebp + 0xa0]
add esp, 0x28
lea edx, [esp + 0x114]
push 0
push esi
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
add esi, 0xfffffffe
lea ecx, [esp + 0x116]
push esi
push ecx
push 0x3e
push ebx
call fcn.00416bd0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x904
ret
Function at 0x419570
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x104
mov eax, dword [esp + 0x108]
push eax
call fcn.004219c8
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x4195a0
lea ecx, [esp]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea edx, [esp]
test edx, edx
je 0x4195c5
mov al, byte [esp]
test al, al
je 0x4195c5
lea eax, [esp]
push eax
call dword [0x4400b0]
add esp, 4
add esp, 0x104
ret
xor eax, eax
add esp, 0x104
ret

Function at 0x419770
Capabilities:
Get socket status

Disassembly:
sub esp, 0x314
mov ecx, dword [esp + 0x320]
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
push ebx
shr eax, 0x1f
add edx, eax
mov eax, ecx
mov dword [esp + 4], edx
mov ecx, 0x3e8
cdq
idiv ecx
mov ecx, dword [esp + 0x31c]
push ebp
push esi
push edi
xor esi, esi
or edi, 0xffffffff
mov dword [esp + 0x11c], esi
lea eax, [edx + edx*4]
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
xor eax, eax
shl edx, 3
cmp ecx, 0xffffffff
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], eax
je 0x4197eb
mov eax, 1
mov dword [esp + 0x120], ecx
mov dword [esp + 0x11c], eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
mov edi, ecx
mov ebp, dword [esp + 0x32c]
mov dword [esp + 0x220], esi
cmp ebp, 0xffffffff
je 0x419842
xor ecx, ecx
cmp eax, esi
mov dword [esp + 0x224], ebp
mov dword [esp + 0x220], 1
jbe 0x419826
lea edx, [esp + 0x1c]
cmp dword [edx], ebp
je 0x419826
inc ecx
add edx, 4
cmp ecx, eax
jb 0x41981a
cmp ecx, eax
jne 0x41983c
cmp eax, 0x40
jae 0x41983c
mov dword [esp + ecx*4 + 0x1c], ebp
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp ebp, edi
jbe 0x419842
mov edi, ebp
mov ebx, dword [sym.imp.WS2_32.dll_select]
inc edi
lea eax, [esp + 0x10]
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x224]
push ecx
lea eax, [esp + 0x124]
push edx
push eax
push edi
call ebx
cmp eax, 0xffffffff
jne 0x419883
call sub.KERNEL32.dll_GetLastError
cmp eax, 4
je 0x419849
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x314
ret
cmp eax, esi
jge 0x419895
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x314
ret
jne 0x4198a4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x314
ret
mov edi, dword [esp + 0x328]
cmp edi, 0xffffffff
je 0x4198d9
lea ecx, [esp + 0x11c]
push ecx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4198c7
mov esi, 1
lea edx, [esp + 0x18]
push edx
push edi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4198d9
or esi, 4
cmp ebp, 0xffffffff
je 0x419905
lea eax, [esp + 0x220]
push eax
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4198f3
or esi, 2
lea ecx, [esp + 0x18]
push ecx
push ebp
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x419905
or esi, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x314
ret
Function at 0x419ca0
Capabilities:
Connect socket

Disassembly:
sub esp, 0x84
push ebx
push ebp
mov ebp, dword [esp + 0x90]
push esi
push edi
mov edi, dword [esp + 0x9c]
mov ecx, dword [ebp + 0x28]
mov ebx, dword [ebp]
mov eax, dword [edi + 0xc]
mov edx, dword [edi + 4]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x419e50
mov eax, dword [esp + 0xa4]
lea ecx, [esp + 0x14]
push 0x80
push ecx
push edi
mov byte [eax], 0
call fcn.00403090
lea edx, [esp + 0x20]
push edx
push str.__Trying__s...
push ebx
call fcn.0040dbf0
mov al, byte [ebx + 0x1b2]
add esp, 0x18
test al, al
je 0x419d19
push esi
push ebp
call fcn.0041a070
add esp, 8
mov eax, dword [ebp]
mov ecx, dword [eax + 0x74]
test ecx, ecx
je 0x419d35
push esi
push ebp
call fcn.00419e60
add esp, 8
test eax, eax
jne 0x419e49
push 1
push esi
call fcn.00419930
mov eax, dword [ebp + 0x28]
add esp, 8
cmp eax, 1
jne 0x419da5
mov ecx, dword [edi + 0x10]
mov edx, dword [edi + 0x14]
push ecx
push edx
push esi
call dword [sym.imp.WS2_32.dll_connect]
mov edi, eax
cmp edi, 0xffffffff
jne 0x419df5
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb
mov dword [esp + 0x10], eax
je 0x419de2
cmp eax, 0x2732
jle 0x419d7e
cmp eax, 0x2734
jle 0x419de2
push eax
push ebp
call fcn.0041b260
push eax
lea eax, [esp + 0x20]
push eax
push str.Failed_to_connect_to__s:__s
push ebx
call fcn.0040dc60
mov ecx, dword [esp + 0x28]
add esp, 0x18
mov dword [ebx + 0x8310], ecx
jmp 0x419da7
xor edi, edi
lea eax, [esp + 0x10]
push eax
push esi
call fcn.00419bc0
add esp, 8
test edi, edi
jne 0x419e10
test al, al
je 0x419e25
mov ecx, dword [esp + 0xa4]
push str.connected_n
push ebx
mov byte [ecx], 1
call fcn.0040dbf0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
mov edx, dword [esp + 0xa0]
push edx
push esi
call fcn.00419b90
add esp, 8
mov edi, eax
cmp edi, 1
jne 0x419da7
cmp dword [ebx + 0x2d0], 2
jne 0x419da7
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x84
ret
cmp edi, 1
jne 0x419e25
push str.Timeout_n
push ebx
call fcn.0040dbf0
add esp, 8
jmp 0x419e49
mov edx, dword [esp + 0x10]
mov dword [ebx + 0x8310], edx
mov eax, dword [esp + 0x10]
push eax
push ebp
call fcn.0041b260
push eax
push 0x44107c
push ebx
call fcn.0040dbf0
add esp, 0x14
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x84
ret
Function at 0x419e60
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x118
or ecx, 0xffffffff
xor eax, eax
push ebx
push ebp
mov ebp, dword [esp + 0x124]
push esi
push edi
mov ebx, dword [ebp]
mov edx, dword [ebx + 0x74]
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 0xff
jae 0x41a057
mov dword [esp + 0x10], eax
mov al, byte [0x446fdc]
mov byte [esp + 0x28], al
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x29]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
stosb byte es:[edi], al
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x419f02
mov edx, dword [ebx + 0x74]
lea ecx, [esp + 0x28]
push 0x100
push ecx
push edx
call fcn.00402ff0
add esp, 0xc
test eax, eax
je 0x419f02
lea eax, [esp + 0x10]
lea ecx, [esp + 0x28]
push eax
push 0
push ecx
push ebp
call fcn.00403260
add esp, 0x10
cmp eax, 1
jne 0x419efa
lea edx, [esp + 0x10]
push edx
push ebp
call fcn.0040cad0
add esp, 8
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x419f55
mov ecx, dword [ebx + 0x74]
lea eax, [esp + 0x10]
push eax
push 0
push ecx
push ebp
call fcn.00403260
add esp, 0x10
cmp eax, 1
jne 0x419f29
lea edx, [esp + 0x10]
push edx
push ebp
call fcn.0040cad0
add esp, 8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x419f55
mov edi, dword [ebx + 0x74]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [esp + 0x28]
test al, al
jne 0x419f6b
mov ecx, dword [ebx + 0x74]
push ecx
push str.Couldnt_bind_to__s
jmp 0x41a04e
lea edx, [esp + 0x28]
push edx
push str.We_bind_local_end_to__s_n
push ebx
call fcn.0040dbf0
add esp, 0xc
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
je 0x41a044
mov eax, dword [esp + 0x10]
test eax, eax
je 0x41a03d
mov esi, dword [eax]
push eax
push ebx
call fcn.00403420
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x14]
mov esi, dword [esp + 0x138]
add esp, 8
push ecx
push edx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x419fff
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push ecx
push esi
mov dword [esp + 0x20], 0x10
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x41a030
push str.getsockname___failed
push ebx
call fcn.0040dc60
add esp, 8
mov eax, 0x2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
call sub.KERNEL32.dll_GetLastError
push eax
push ebp
mov dword [ebx + 0x8310], eax
call fcn.0041b260
push eax
push str.bind_failure:__s
push ebx
call fcn.0040dc60
add esp, 0x14
mov eax, 0x2d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x118
ret
lea edx, [esp + 0x28]
push edx
jmp 0x41a049
lea eax, [esp + 0x28]
push eax
push str.couldnt_find_my_own_IP_address___s_
push ebx
call fcn.0040dc60
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x2d
pop ebx
add esp, 0x118
ret
Function at 0x41a070
Capabilities:
Set socket configuration

Disassembly:
mov edx, dword [esp + 8]
push esi
push edi
mov edi, dword [esp + 0xc]
lea ecx, [esp + 0xc]
push 4
mov esi, dword [edi]
xor eax, eax
push ecx
push 1
mov al, byte [esi + 0x1b2]
push 6
push edx
mov dword [esp + 0x20], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x41a0bc
call sub.KERNEL32.dll_GetLastError
push eax
push edi
call fcn.0041b260
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.0040dbf0
add esp, 0x14
pop edi
pop esi
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.0040dbf0
add esp, 8
pop edi
pop esi
ret