Function at 0x41a410
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Read and send data from client to server
Read file on windows
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47195d
mov eax, dword fs:[0]
push eax
sub esp, 0x35c
mov eax, dword [0x4915c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 4], 1
call dword [0x49297c]
push 0
push 1
push 2
mov dword [ebp - 0x238], eax
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
call fcn.00442657
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41a47b
push 0x80004005
call fcn.004029c0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x22c], eax
push 0x47b6d0
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 2
call fcn.004031e0
push 0x47b6d0
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 3
call fcn.004031e0
mov byte [ebp - 4], 4
call fcn.00442657
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41a4d3
push 0x80004005
call fcn.004029c0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x234], eax
mov byte [ebp - 4], 5
mov eax, dword [ebp + 8]
test eax, eax
je 0x41a540
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jg 0x41a540
add eax, eax
mov dword [ebp - 0x240], eax
call fcn.0045a170
mov edi, esp
test edi, edi
je 0x41a540
mov ecx, dword [ebp - 0x240]
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x238]
push 0
push 0
push ecx
push edi
push 0xffffffffffffffff
push edx
push 0
push eax
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, edi
jmp 0x41a542
xor eax, eax
push 0x47eb28
push eax
call fcn.00456e4c
mov edi, eax
add esp, 8
test edi, edi
mov dword [ebp - 0x24c], edi
je 0x41a83e
push 2
push 0
push edi
call fcn.00456ee6
push edi
call fcn.004572a3
push 0
push 0
push edi
mov dword [ebp - 0x240], eax
call fcn.00456ee6
mov ecx, dword [ebp - 0x240]
add esp, 0x1c
mov dword [esi + 0xcc], ecx
call fcn.00442657
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41a5a9
push 0x80004005
call fcn.004029c0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x230], eax
push 2
push 0x47eb2c
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 6
call fcn.00403590
push 0x1e
push str.SsS5RoOHpjOb58XTd2hc1GnLdT1mky
lea ecx, [ebp - 0x230]
call fcn.00406360
push 0x3c
push str._r_nContent_Disposition:_form_data__name_upgrade___filename_
lea ecx, [ebp - 0x230]
call fcn.00406360
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x230]
call fcn.00406360
push 3
push 0x47ebf4
lea ecx, [ebp - 0x230]
call fcn.00406360
push 0x2a
push str.Content_Type:_application_octet_stream_r_n_r_n
lea ecx, [ebp - 0x230]
call fcn.00406360
push 4
push str._r_n__
lea ecx, [ebp - 0x234]
call fcn.00406360
push 0x1e
push str.SsS5RoOHpjOb58XTd2hc1GnLdT1mky
lea ecx, [ebp - 0x234]
call fcn.00406360
push 4
push str.___r_n
lea ecx, [ebp - 0x234]
call fcn.00406360
call fcn.00442657
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41a67c
push 0x80004005
call fcn.004029c0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x244], eax
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x230]
mov eax, dword [ecx - 0xc]
mov edx, dword [ebp - 0x234]
mov ecx, dword [edx - 0xc]
add eax, ecx
add eax, dword [ebp - 0x240]
push eax
lea eax, [ebp - 0x244]
push 0x4804d8
push eax
call fcn.004031c0
mov ecx, dword [esi + 0xb4]
push ecx
lea edx, [ebp - 0x22c]
push str.POST___s_upgrade.cgi_HTTP_1.1_r_n
push edx
call fcn.004031c0
add esp, 0x18
push 0x23
push str.Content_Type:_multipart_form_data_
lea ecx, [ebp - 0x22c]
call fcn.00406360
push 9
push str.boundary
lea ecx, [ebp - 0x22c]
call fcn.00406360
push 0x1e
push str.SsS5RoOHpjOb58XTd2hc1GnLdT1mky
lea ecx, [ebp - 0x22c]
call fcn.00406360
push 2
push 0x47baf4
lea ecx, [ebp - 0x22c]
call fcn.00406360
push 0x10
push str.Content_Length:
lea ecx, [ebp - 0x22c]
call fcn.00406360
mov ecx, dword [ebp - 0x244]
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x22c]
call fcn.00406360
push 2
push 0x47baf4
lea ecx, [ebp - 0x22c]
call fcn.00406360
cmp dword [esi + 0x70], 0
je 0x41a7ab
mov eax, dword [esi + 0xb0]
mov ecx, dword [esi + 0xb8]
push eax
push ecx
lea edx, [ebp - 0x23c]
push str._s_s
push edx
call fcn.004031c0
mov eax, dword [ebp - 0x23c]
mov ecx, dword [eax - 0xc]
add esp, 0x10
push ecx
push eax
lea ecx, [ebp - 0x22c]
call fcn.00406360
push 2
push 0x47baf4
lea ecx, [ebp - 0x22c]
call fcn.00406360
mov eax, dword [esi + 0x4b8]
mov ecx, dword [esi + 0x74]
push eax
push ecx
push str.Referer:_http:___s:_d_r_n
lea edi, [ebp - 0x22c]
call fcn.00406410
add esp, 0xc
push 2
push 0x47baf4
mov ecx, edi
call fcn.00406360
mov ecx, dword [ebp - 0x230]
mov eax, dword [ecx - 0xc]
push eax
push ecx
mov ecx, edi
call fcn.00406360
cmp ebx, 0xffffffff
jne 0x41a946
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41a818
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a83e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a864
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x23c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a88a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x248]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a8b0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a8d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a8f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41a91f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
lea esp, [ebp - 0x378]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00455843
mov esp, ebp
pop ebp
ret 8
movzx ecx, word [esi + 0x4b8]
xor eax, eax
mov dword [ebp - 0x228], eax
push ecx
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x21c], eax
mov word [ebp - 0x228], 2
call dword [sym.imp.WS2_32.dll_htons]
mov esi, dword [esi + 0x74]
test esi, esi
mov word [ebp - 0x226], ax
jne 0x41a989
xor eax, eax
jmp 0x41a9b9
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x41a99e
xor eax, eax
jmp 0x41a9b9
lea edi, [eax + eax]
mov eax, edi
call fcn.0045a170
mov edx, dword [ebp - 0x238]
mov eax, esp
push edx
push edi
push esi
push eax
call fcn.00403150
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x250]
push eax
push 0x8004667e
push ebx
mov dword [ebp - 0x250], 1
call esi
push 0x10
lea ecx, [ebp - 0x228]
push ecx
xor edi, edi
push ebx
mov dword [ebp - 0x25c], 0x14
mov dword [ebp - 0x258], edi
call dword [sym.imp.WS2_32.dll_connect]
lea edx, [ebp - 0x25c]
push edx
push edi
lea eax, [ebp - 0x368]
push eax
push edi
push ebx
mov dword [ebp - 0x364], ebx
mov dword [ebp - 0x368], 1
call dword [sym.imp.WS2_32.dll_select]
lea ecx, [ebp - 0x368]
push ecx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x41aa4b
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x41a7f2
lea ecx, [ebp - 0x250]
push ecx
push 0x8004667e
push ebx
mov dword [ebp - 0x250], edi
call esi
push 0x200
lea edx, [ebp - 0x217]
push edi
push edx
mov byte [ebp - 0x218], 0
call fcn.00457910
mov eax, dword [ebp - 0x22c]
add esp, 0xc
cmp eax, edi
je 0x41aad0
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jg 0x41aad0
lea edi, [eax + eax]
mov eax, edi
call fcn.0045a170
mov esi, esp
test esi, esi
je 0x41aad0
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x238]
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push eax
push 0
push ecx
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x41aad2
xor eax, eax
lea edx, [ebp - 0x218]
sub edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x41aae0
lea eax, [ebp - 0x218]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41aaf5
push 0
sub eax, edx
push eax
lea edx, [ebp - 0x218]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov esi, dword [ebp - 0x240]
mov eax, esi
cdq
and edx, 0x1ff
add eax, edx
mov edi, eax
sar edi, 9
and esi, 0x800001ff
jns 0x41ab37
dec esi
or esi, 0xfffffe00
inc esi
test edi, edi
jle 0x41ab9a
mov dword [ebp - 0x240], 0
jmp 0x41ab50
mov eax, dword [ebp - 0x24c]
push eax
push 0x200
lea ecx, [ebp - 0x218]
push 1
push ecx
call fcn.004575ad
add esp, 0x10
push 0
push 0x200
lea edx, [ebp - 0x218]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x41abc9
mov eax, dword [ebp - 0x240]
add eax, 1
cmp eax, edi
mov dword [ebp - 0x240], eax
jl 0x41ab50
mov ecx, dword [ebp - 0x24c]
push ecx
push esi
lea edx, [ebp - 0x218]
push 1
push edx
call fcn.004575ad
add esp, 0x10
push 0
push esi
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x41abef
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x41a80c
mov ecx, dword [ebp - 0x24c]
push ecx
call fcn.0045763a
mov edx, dword [ebp - 0x234]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jg 0x41ac4e
lea edi, [eax + eax]
mov eax, edi
call fcn.0045a170
mov esi, esp
test esi, esi
je 0x41ac4e
mov eax, dword [ebp - 0x234]
mov ecx, dword [ebp - 0x238]
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push eax
push 0
push ecx
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x41ac50
xor eax, eax
mov ecx, eax
lea edx, [ebp - 0x218]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x41ac58
lea eax, [ebp - 0x218]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x41ac70
push 0
sub eax, edx
push eax
lea edx, [ebp - 0x218]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_send]
push 4
lea eax, [ebp - 0x254]
push eax
push 0x1006
push 0xffff
push ebx
mov dword [ebp - 0x254], 0x4e20
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0
push 0x200
lea ecx, [ebp - 0x218]
push ecx
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x41ad9e
mov byte [ebp + eax - 0x218], 0
call fcn.00442657
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41acef
push 0x80004005
call fcn.004029c0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x238], eax
lea ecx, [ebp - 0x218]
push ecx
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 8
call fcn.00402d20
mov esi, dword [ebp - 0x238]
mov edi, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x41ad43
push edi
lea ecx, [ebp - 0x238]
call fcn.00402a40
mov esi, dword [ebp - 0x238]
lea edx, [edi + 1]
push edx
push esi
call fcn.004562d5
add esp, 8
test edi, edi
jl 0x41aed9
cmp edi, dword [esi - 8]
jg 0x41aed9
mov dword [esi - 0xc], edi
mov word [esi + edi*2], 0
cmp dword [esi - 0xc], 0
jl 0x41ad7e
push 0x47baf4
push esi
call fcn.004560a2
add esp, 8
lea eax, [esi - 0x10]
mov byte [ebp - 4], 7
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ad9e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x244]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41adcb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x230]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41adf1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ae17
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x23c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ae3d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x248]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ae63
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x22c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41ae89
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41aeac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41aed2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x41a922
push 0x80070057
call fcn.004029c0
int3