Function at 0x401a40
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw socket
Create tcp socket
Create udp socket
Initialize winsock library
Read file on windows
Resolve dns

Disassembly:
sub esp, 0x4a4
push ebp
push esi
push edi
call fcn.0040ae10
push 1
call fcn.00408360
push 0
push 0x44abf0
push 0x420438
call fcn.0040bf50
push 0x44a83c
push 0x44abfe
push 0x42042c
mov dword [0x6808fc], eax
call fcn.0040bf50
push 0
push 0
mov dword [0x6808f8], eax
call fcn.00403270
push 0x4f
call fcn.00403530
push 0x12
push 0x420050
push 0xf
push 0x420040
call fcn.0040e280
push 1
push 1
call fcn.00404360
add esp, 0x40
push 1
push 0
call fcn.00404360
mov eax, dword [0x430c20]
push eax
call fcn.00412cb0
push 0x420418
call fcn.00401fb0
push 0
push 0x42040c
call fcn.00404e60
mov dword [0x6808f4], eax
call fcn.00403490
mov ecx, dword [0x6808f4]
push ecx
push 0
push 0
call fcn.00410179
push 0x4203fc
call fcn.00401fb0
push 0x4203f8
push 0x4203ec
call fcn.004155d8
mov esi, eax
add esp, 0x30
test esi, esi
jne 0x401b8e
push 0x1b6
push 0x4203ec
call fcn.0041c750
add esp, 8
cmp eax, 0xffffffff
je 0x401fa1
push eax
call fcn.00416900
push 0x4203e8
push 0x4203ec
call fcn.004155d8
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x401fa1
mov edi, 0x4203d8
or ecx, 0xffffffff
xor eax, eax
push 0x43073c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x4203d4
mov edx, ecx
mov esi, edi
mov edi, 0x43073c
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00415586
push ebp
jmp 0x401b9f
push 0x43073c
push 0x4203d4
push esi
call fcn.00415570
push esi
call fcn.0041551a
add esp, 0x10
push ebx
push 0
push 0x4203c4
call fcn.0041c70c
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 8
test eax, eax
jne 0x401c19
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push 0x4203c4
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x401bfa
mov eax, dword [0x430c20]
push 0x420394
push eax
call fcn.00401500
add esp, 8
lea ecx, [esp + 0x10]
push 0
push ecx
push 0x2df0
push 0x44ac10
push esi
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call edi
jmp 0x401c42
push 0x420370
call fcn.00401fb0
mov ecx, 0xb7c
mov esi, 0x422648
mov edi, 0x44ac10
add esp, 4
rep movsd dword es:[edi], dword [esi]
call fcn.00401340
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x420364
call fcn.0041c70c
add esp, 8
test eax, eax
jne 0x401ca0
push eax
push 0x80
push 3
push eax
push 1
push closesocket
push 0x420364
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x401c87
mov edx, dword [0x430c20]
push 0x420334
push edx
call fcn.00401500
add esp, 8
lea eax, [esp + 0x10]
push 0
push eax
push 0x124
push 0x44a840
push esi
call ebx
push esi
call edi
jmp 0x401d06
xor ecx, ecx
xor edx, edx
mov dword [0x44a840], ecx
mov dword [0x44a84d], edx
mov dword [0x44a844], ecx
mov dword [0x44a851], edx
mov dword [0x44a848], ecx
mov dword [0x44a855], edx
mov byte [0x44a84c], cl
mov byte [0x44a859], dl
mov dword [0x44a85c], edx
mov eax, 0x44a86d
lea edx, [eax - 0xd]
xor ecx, ecx
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov byte [edx + 0xc], cl
mov edx, eax
add eax, 0x1a
mov dword [edx], ecx
cmp eax, 0x44a971
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov byte [edx + 0xc], cl
jl 0x401cdf
push 0
push 0x420328
call fcn.0041c70c
add esp, 8
test eax, eax
jne 0x401d75
push eax
push 0x80
push 3
push eax
push 1
push closesocket
push 0x420328
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x401d4a
mov eax, dword [0x430c20]
push 0x4202f8
push eax
call fcn.00401500
add esp, 8
lea ecx, [esp + 0x10]
push 0
push ecx
push 0x6a4
push 0x44da10
push esi
call ebx
mov eax, 0xf0f0f0f1
push esi
mul dword [esp + 0x14]
shr edx, 4
mov dword [0x680918], edx
call edi
jmp 0x401d8b
mov dword [0x680918], 0
xor ecx, ecx
mov eax, 0x6a4
mov edi, 0x44da10
lea edx, [esp + 0x1b4]
push edx
push 0x4202f0
call fcn.0040ab10
lea ecx, [esp + 0x1bc]
add esp, 8
mov dword [0x6955f4], ecx
xor eax, eax
jmp 0x401db7
mov ecx, dword [0x6955f4]
mov bl, byte [ecx + eax]
shl bl, 2
mov byte [ecx + eax], bl
inc eax
cmp eax, 0x300
jl 0x401db1
mov eax, dword [0x6808c8]
pop ebx
test eax, eax
jne 0x401e15
mov eax, dword [0x430c20]
push 0x42ca50
push 0x430c1c
push eax
call fcn.00413840
add esp, 0xc
test al, al
jge 0x401dfa
mov dword [0x6808c8], 1
jmp 0x401e15
push 0x42
push 0x42ca50
call fcn.00413f30
push 0x42
push 0x42ca50
call fcn.00414020
add esp, 0x10
cmp byte [0x420480], 1
jne 0x401fa1
push 0x4202dc
call fcn.00401fb0
add esp, 4
lea ecx, [esp + 0x20]
push ecx
push 0x202
call sub.WS2_32.dll_WSAStartup
cmp eax, 0xffffffff
jne 0x401e54
mov edx, dword [0x430c20]
push 0x4202c0
push edx
jmp 0x401f75
cmp byte [0x420480], 1
jne 0x401fa1
push 0x4202b0
call fcn.00401fb0
add esp, 4
push 0x43073c
call sub.WS2_32.dll_inet_addr
push 0x43073c
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x401eb1
mov eax, dword [0x430c20]
push 0x420294
push eax
call fcn.00401500
add esp, 8
call sub.WS2_32.dll_WSACleanup
pop edi
pop esi
mov byte [0x420480], 0
xor eax, eax
pop ebp
add esp, 0x4a4
ret
cmp byte [0x420480], 1
jne 0x401fa1
xor ecx, ecx
lea edi, [esp + 0x14]
mov dword [esp + 0x10], ecx
push 0x1b5b
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
mov edx, dword [eax + 0xc]
movsx ecx, word [eax + 0xa]
mov esi, dword [edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ax, word [eax + 8]
mov word [esp + 0x14], ax
call sub.WS2_32.dll_htons
push 0
push 1
push 2
mov word [esp + 0x1e], ax
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [0x430738], eax
jne 0x401f26
mov ecx, dword [0x430c20]
push 0x420280
push ecx
jmp 0x401f75
mov edx, dword [0x430c20]
push 0x31
push 0x1000
push edx
push eax
call sub.WS2_32.dll_WSAAsyncSelect
cmp eax, 0xffffffff
jne 0x401f46
push 0x420258
jmp 0x401f6f
mov edx, dword [0x430738]
lea ecx, [esp + 0x10]
push 0x10
push ecx
push edx
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x401f8f
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x401f8f
push 0x420240
mov eax, dword [0x430c20]
push eax
call fcn.00401500
add esp, 8
call sub.WS2_32.dll_WSACleanup
pop edi
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0x4a4
ret
push 0x42022c
call fcn.00401fb0
add esp, 4
call fcn.00402050
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x4a4
ret