Function at 0x420910
Capabilities:
Get local ipv4 addresses
Get socket information
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [0x4c07e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 0x1c]
push edi
mov edi, dword [ebp + 0xc]
push 0x800
mov dword [ebp - 0x820], eax
lea eax, [ebp - 0x804]
push 0
push eax
mov dword [ebp - 0x828], ebx
call fcn.00466b60
push dword [ebp + 0x10]
mov dword [ebx], 0
push edi
call fcn.0041e110
mov ebx, eax
add esp, 0x14
mov dword [ebp - 0x824], ebx
test ebx, ebx
js 0x420b1d
test esi, esi
je 0x4209e2
lea eax, [ebp - 0x81c]
mov dword [ebp - 0x81c], 0x10
push eax
lea eax, [ebp - 0x814]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jns 0x4209a9
push str.getsockname
call fcn.0047169f
add esp, 4
jmp 0x4209e2
push 0xa
push 0
push 0
push dword [ebp + 0x20]
lea eax, [ebp - 0x814]
push esi
push dword [ebp - 0x81c]
push eax
call fcn.00420bd0
test eax, eax
je 0x4209e2
push eax
push str.getnameinfo___failed_:__d_n
push 2
call fcn.00471428
add esp, 4
push eax
call fcn.00403a60
add esp, 0xc
mov eax, dword [ebp + 0x10]
movzx eax, ax
push eax
push edi
push dword [ebp - 0x820]
lea eax, [ebp - 0x804]
push str.GET__s_HTTP_1.0_r_nHost:__s:_d_r_nConnection:_Close_r_nUser_Agent:_Darwin_10.3.0__UPnP_1.0__MiniUPnPc_1.4_r_n_r_n
push 0x800
push eax
call fcn.0041ee00
mov edi, eax
add esp, 0x18
xor esi, esi
test edi, edi
jle 0x420a36
push 0
mov ecx, edi
lea eax, [ebp - 0x804]
sub ecx, esi
add eax, esi
push ecx
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
js 0x420b09
add esi, eax
cmp esi, edi
jl 0x420a11
push 0x1388
push 0x800
lea eax, [ebp - 0x804]
mov dword [ebp - 0x820], 1
push eax
xor edi, edi
xor esi, esi
push ebx
mov dword [ebp - 0x81c], edi
mov dword [ebp - 0x818], esi
call fcn.004202b0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jle 0x420ae2
cmp dword [ebp - 0x820], 0
je 0x420b99
lea eax, [ebx - 3]
xor esi, esi
test eax, eax
jle 0x420ab7
cmp byte [ebp + esi - 0x804], 0xd
jne 0x420ab2
cmp byte [ebp + esi - 0x803], 0xa
jne 0x420ab2
cmp byte [ebp + esi - 0x802], 0xd
jne 0x420ab2
cmp byte [ebp + esi - 0x801], 0xa
je 0x420b30
inc esi
cmp esi, eax
jl 0x420a86
mov esi, dword [ebp - 0x818]
push 0x1388
push 0x800
lea eax, [ebp - 0x804]
push eax
push dword [ebp - 0x824]
call fcn.004202b0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jg 0x420a70
mov eax, dword [ebp - 0x828]
push dword [ebp - 0x824]
mov dword [eax], esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00464e2f
mov esp, ebp
pop ebp
ret
push str.send
call fcn.0047169f
add esp, 4
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00464e2f
mov esp, ebp
pop ebp
ret
lea eax, [ebx - 4]
mov dword [ebp - 0x820], 0
cmp esi, eax
jge 0x420ab7
mov edi, dword [ebp - 0x818]
sub edi, esi
add edi, ebx
lea eax, [edi - 4]
push eax
mov eax, dword [ebp - 0x81c]
push eax
call fcn.0046b698
sub ebx, esi
mov dword [ebp - 0x81c], eax
sub ebx, 4
lea ecx, [ebp - 0x800]
add ecx, esi
push ebx
push ecx
mov ecx, dword [ebp - 0x818]
add ecx, eax
push ecx
call fcn.00466cc0
lea esi, [edi - 4]
add esp, 0x14
mov edi, dword [ebp - 0x81c]
mov dword [ebp - 0x818], esi
jmp 0x420abd
add esi, ebx
push esi
push edi
call fcn.0046b698
mov edi, eax
lea eax, [ebp - 0x804]
push ebx
push eax
mov eax, dword [ebp - 0x818]
add eax, edi
mov dword [ebp - 0x81c], edi
push eax
call fcn.00466cc0
add esp, 0x14
mov dword [ebp - 0x818], esi
jmp 0x420abd