Function at 0x403950
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Read and send data from client to server
Read file on windows
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bad04
mov eax, dword fs:[0]
push eax
mov eax, 0x1060
call fcn.0043b180
mov eax, dword [0x4fc060]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x1028], ebx
mov dword [ebp - 0x102c], eax
mov dword [ebp - 0x1034], ecx
mov dword [ebp - 0x1044], edx
push 0x400
mov dword [ebp - 4], 0
mov eax, dword [0x5058f4]
lea ecx, [ebp - 0x1014]
push 0
push ecx
mov dword [ebp - 0x105c], eax
mov dword [ebp - 0x1030], 1
call fcn.0043c360
push 0x400
lea edx, [ebp - 0x414]
push 0
push edx
call fcn.0043c360
push 0x400
lea eax, [ebp - 0xc14]
push 0
push eax
call fcn.0043c360
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
push ecx
lea edx, [ebp - 0x1014]
push 0x400
push edx
call fcn.0043a122
add esp, 0x34
lea eax, [ebp - 0x1014]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edx, dword [0x4fc020]
mov dword [ebp - 0x1038], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc020
call eax
add eax, 0x10
mov dword [ebp - 0x103c], eax
mov ecx, 0x4f7270
mov byte [ebp - 4], 1
test ecx, 0xffff0000
jne 0x403a71
mov edx, ecx
movzx edi, dx
push edi
call fcn.00401080
add esp, 4
test eax, eax
je 0x403a8c
push eax
mov eax, edi
lea edi, [ebp - 0x103c]
call fcn.00405650
jmp 0x403a8c
push 0x4f7270
mov eax, 1
lea ebx, [ebp - 0x103c]
call fcn.004054e0
mov ebx, dword [ebp - 0x1028]
mov byte [ebp - 4], 2
mov eax, dword [0x4fc020]
mov edx, dword [eax + 0xc]
mov ecx, 0x4fc020
call edx
add eax, 0x10
mov dword [ebp - 0x1050], eax
mov eax, 0x4f7274
mov byte [ebp - 4], 3
test eax, 0xffff0000
jne 0x403ada
mov ecx, eax
movzx edi, cx
push edi
call fcn.00401080
add esp, 4
test eax, eax
je 0x403af5
push eax
mov eax, edi
lea edi, [ebp - 0x1050]
call fcn.00405650
jmp 0x403af5
push 0x4f7274
mov eax, 1
lea ebx, [ebp - 0x1050]
call fcn.004054e0
mov ebx, dword [ebp - 0x1028]
mov byte [ebp - 4], 4
mov edx, dword [0x4fc020]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc020
call eax
add eax, 0x10
mov dword [ebp - 0x1054], eax
mov byte [ebp - 4], 5
test esi, esi
je 0x403b42
test esi, 0xffff0000
jne 0x403b46
movzx edi, si
push edi
call fcn.00401080
add esp, 4
test eax, eax
je 0x403b6b
push eax
mov eax, edi
lea edi, [ebp - 0x1054]
call fcn.00405650
jmp 0x403b6b
xor eax, eax
jmp 0x403b59
mov eax, esi
lea edx, [eax + 1]
jmp 0x403b50
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403b50
sub eax, edx
push esi
lea ebx, [ebp - 0x1054]
call fcn.004054e0
mov ebx, dword [ebp - 0x1028]
mov byte [ebp - 4], 6
mov edx, dword [0x4fc020]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc020
call eax
add eax, 0x10
mov dword [ebp - 0x1048], eax
mov byte [ebp - 4], 7
test ebx, ebx
je 0x403bb8
test ebx, 0xffff0000
jne 0x403bbc
movzx edi, bx
push edi
call fcn.00401080
add esp, 4
test eax, eax
je 0x403bdc
push eax
mov eax, edi
lea edi, [ebp - 0x1048]
call fcn.00405650
jmp 0x403bdc
xor eax, eax
jmp 0x403bca
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403bc1
sub eax, edx
mov ecx, dword [ebp - 0x1028]
push ecx
lea ebx, [ebp - 0x1048]
call fcn.004054e0
lea edx, [ebp - 0x1068]
push esi
push edx
lea ecx, [ebp - 0x1050]
mov byte [ebp - 4], 8
call fcn.004051f0
lea ecx, [ebp - 0x1048]
push ecx
lea edx, [ebp - 0x1060]
push edx
mov ecx, eax
mov byte [ebp - 4], 9
call fcn.00404fc0
add esp, 0x10
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x1068]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403c35
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x4fc020]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc020
call eax
add eax, 0x10
mov dword [ebp - 0x1040], eax
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x102c]
test eax, eax
je 0x403c83
test eax, 0xffff0000
jne 0x403c87
movzx esi, ax
push esi
call fcn.00401080
add esp, 4
test eax, eax
je 0x403cab
push eax
mov eax, esi
lea edi, [ebp - 0x1040]
call fcn.00405650
jmp 0x403cab
xor eax, eax
jmp 0x403c99
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403c90
sub eax, edx
mov ecx, dword [ebp - 0x102c]
push ecx
lea ebx, [ebp - 0x1040]
call fcn.004054e0
mov byte [ebp - 4], 0xd
mov edx, dword [0x4fc020]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc020
call eax
add eax, 0x10
mov dword [ebp - 0x104c], eax
mov byte [ebp - 4], 0xe
mov eax, dword [ebp - 0x1034]
test eax, eax
je 0x403cfd
test eax, 0xffff0000
jne 0x403d01
movzx esi, ax
push esi
call fcn.00401080
add esp, 4
test eax, eax
je 0x403d1f
push eax
mov eax, esi
lea edi, [ebp - 0x104c]
call fcn.00405650
jmp 0x403d1f
xor eax, eax
jmp 0x403d0d
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403d04
sub eax, edx
mov ecx, dword [ebp - 0x1034]
push ecx
lea ebx, [ebp - 0x104c]
call fcn.004054e0
lea edx, [ebp - 0x103c]
push edx
lea eax, [ebp - 0x1034]
push eax
lea ecx, [ebp - 0x1040]
mov byte [ebp - 4], 0xf
call fcn.00404fc0
lea ecx, [ebp - 0x104c]
push ecx
lea edx, [ebp - 0x1058]
push edx
mov ecx, eax
mov byte [ebp - 4], 0x10
call fcn.00404fc0
add esp, 0x10
mov byte [ebp - 4], 0x12
mov eax, dword [ebp - 0x1034]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403d7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [0x4fc020]
mov eax, dword [edx + 0xc]
mov ecx, 0x4fc020
call eax
add eax, 0x10
mov dword [ebp - 0x1028], eax
mov ecx, 0x4f70ba
mov byte [ebp - 4], 0x13
test ecx, 0xffff0000
jne 0x403dca
mov edx, ecx
movzx esi, dx
push esi
call fcn.00401080
add esp, 4
test eax, eax
je 0x403ddc
push eax
mov eax, esi
lea edi, [ebp - 0x1028]
call fcn.00405650
jmp 0x403ddc
push 0x4f70ba
xor eax, eax
lea ebx, [ebp - 0x1028]
call fcn.004054e0
lea eax, [ebp - 0x1064]
push str.STOR
push eax
lea ecx, [ebp - 0x1058]
mov byte [ebp - 4], 0x14
call fcn.004051f0
lea ecx, [ebp - 0x102c]
push ecx
mov ecx, eax
mov byte [ebp - 4], 0x15
call fcn.004050e0
add esp, 0xc
mov byte [ebp - 4], 0x16
mov ecx, dword [eax]
mov edi, dword [ebp - 0x1028]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x403e68
cmp dword [edi + 0xc], 0
lea esi, [edi + 0xc]
jl 0x403e59
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x403e59
call fcn.004055e0
mov ebx, eax
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x403e4e
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
add ebx, 0x10
mov dword [ebp - 0x1028], ebx
jmp 0x403e68
mov eax, dword [ecx - 0xc]
push ecx
lea ebx, [ebp - 0x1028]
call fcn.004054e0
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x102c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403e8e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0x14
mov eax, dword [ebp - 0x1064]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403eb4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x1028]
push ecx
lea edx, [ebp - 0x414]
push 0x400
push edx
call fcn.0043a0c3
lea eax, [ebp - 0x414]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403ed8
mov ebx, dword [ebp + 0xc]
sub eax, edx
mov esi, eax
cmp ebx, 1
jne 0x403f11
mov edi, dword [ebp - 0x105c]
push edi
call fcn.00412820
add esp, 4
cmp eax, ebx
jne 0x403f25
push esi
lea eax, [ebp - 0x414]
push eax
push edi
call fcn.00410a00
add esp, 0xc
jmp 0x403f25
mov edx, dword [ebp + 8]
push 0
push esi
lea ecx, [ebp - 0x414]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_send]
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp - 0x1038]
mov esi, eax
mov eax, 2
mov word [ebp - 0x1024], ax
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
mov edx, dword [ebp + 0x14]
mov ecx, dword [eax]
push edx
mov dword [ebp - 0x1020], ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1022], ax
push 0x10
lea eax, [ebp - 0x1024]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x403f93
mov ecx, dword [ebp - 0x1044]
mov dword [ebp - 0x1030], 0
mov dword [ecx], 2
jmp 0x40413c
cmp ebx, 1
jne 0x403ffa
call fcn.004139e0
push eax
call fcn.00412440
mov edx, dword [0x5058f0]
push edx
mov dword [ebp - 0x1038], eax
call fcn.004129a0
mov ebx, eax
push esi
push ebx
call fcn.004108f0
add esp, 0x10
test eax, eax
je 0x403fe9
push ebx
call fcn.00412d30
add esp, 4
cmp eax, 1
jne 0x403fe9
push ebx
call fcn.00412820
add esp, 4
cmp eax, 1
jne 0x403fe9
mov dword [ebp - 0x1030], eax
jmp 0x404000
mov eax, dword [ebp - 0x1044]
mov dword [eax], 2
jmp 0x40413c
mov ebx, dword [ebp - 0x1038]
mov ecx, dword [ebp - 0x1060]
push 0x4f7474
push ecx
lea edx, [ebp - 0x102c]
push edx
call fcn.0043a58f
add esp, 0xc
test eax, eax
jne 0x4040c4
push 0x400
push eax
lea eax, [ebp - 0x814]
push eax
call fcn.0043c360
mov ecx, dword [ebp - 0x102c]
push ecx
push 0x400
lea edx, [ebp - 0x814]
push 1
push edx
call fcn.0043a820
mov edi, eax
add esp, 0x1c
test edi, edi
jle 0x4040b3
cmp dword [ebp + 0xc], 1
jne 0x40407f
push ebx
call fcn.00412820
add esp, 4
cmp eax, 1
jne 0x404090
push edi
lea eax, [ebp - 0x814]
push eax
push ebx
call fcn.00410a00
add esp, 0xc
jmp 0x404090
push 0
push edi
lea ecx, [ebp - 0x814]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_send]
mov edx, dword [ebp - 0x102c]
push edx
push 0x400
lea eax, [ebp - 0x814]
push 1
push eax
call fcn.0043a820
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x404058
mov ecx, dword [ebp - 0x102c]
push ecx
call fcn.0043a8aa
add esp, 4
jmp 0x4040da
mov edx, dword [ebp - 0x1044]
mov dword [ebp - 0x1030], 0
mov dword [edx], 3
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp - 0x1030], 0
je 0x40410b
cmp dword [ebp + 0xc], 1
jne 0x40410b
push ebx
call fcn.004123d0
push ebx
call fcn.00412160
mov eax, dword [ebp - 0x1038]
push eax
call fcn.00411410
add esp, 0xc
mov ecx, dword [ebp - 0x1044]
cmp dword [ecx], 2
je 0x40413c
mov ebx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov esi, dword [ebp - 0x105c]
push ebx
push edx
lea edi, [ebp - 0xc14]
call fcn.004044c0
mov eax, dword [ebp + 8]
push ebx
push eax
call fcn.004044c0
add esp, 0x10
mov byte [ebp - 4], 0x12
mov eax, dword [ebp - 0x1028]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404162
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0x1058]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404188
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xd
mov eax, dword [ebp - 0x104c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4041ae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xb
mov eax, dword [ebp - 0x1040]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4041d4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 8
mov eax, dword [ebp - 0x1060]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4041fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x1048]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404220
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 - 0x1054]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404246
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 - 0x1050]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40426c
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 - 0x103c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404292
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 + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4042b8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x1030]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00439f9b
mov esp, ebp
pop ebp
ret