Function at 0x40384a
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffdda8
push ebx
push esi
push edi
mov byte [ebp - 0x100], 0
mov dword [ebp - 0x108], 0
mov dword [ebp - 0x10c], 0x50
mov esi, 0x2000
push esi
mov esi, 0
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.004084d0
add esp, 0xc
push dword [ebp + 0xc]
lea esi, [ebp - 0x2240]
push esi
call fcn.004081dc
add esp, 8
mov esi, 0x41442a
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.00408cf0
add esp, 8
add eax, 1
mov dword [ebp - 0x2244], eax
mov esi, 0x414431
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.00408cf0
add esp, 8
mov dword [ebp - 0x2248], eax
cmp dword [ebp - 0x2248], 0
jne 0x4038e9
jmp 0x4038fa
mov esi, dword [ebp - 0x2248]
inc dword [ebp - 0x2248]
jmp 0x4038fa
mov esi, 0
push esi
lea esi, [ebp - 0x10c]
push esi
lea esi, [ebp - 0x100]
push esi
mov esi, 0x414438
push esi
push dword [ebp - 0x2244]
call fcn.004086c8
add esp, 0x14
mov dword [ebp - 0x104], eax
cmp dword [ebp - 0x104], 2
mov esi, 1
je 0x40393f
mov esi, 0
cmp esi, 0
mov esi, 1
je 0x403952
mov esi, 0
cmp dword [ebp - 0x104], 1
mov edi, 1
je 0x403969
mov edi, 0
cmp edi, 0
mov edi, 1
je 0x40397c
mov edi, 0
and edi, esi
cmp edi, 0
jne 0x40398c
jmp 0x4039b9
mov esi, 0
push esi
push dword [ebp - 0x104]
push dword [ebp - 0x214]
push dword [ebp + 8]
mov esi, 0x41444f
push esi
call fcn.00401016
add esp, 0x14
jmp 0x4043cf
mov esi, 0x414484
push esi
call fcn.00408480
add esp, 4
push eax
mov esi, 0x41447f
push esi
push dword [ebp - 0x2244]
call fcn.004088f4
add esp, 0xc
cmp dword [ebp - 0x2248], 0
jne 0x4039ee
jmp 0x403a16
mov esi, 0x414494
push esi
call fcn.00408480
add esp, 4
push eax
mov esi, 0x414489
push esi
push dword [ebp - 0x2248]
call fcn.004088f4
add esp, 0xc
jmp 0x403a16
mov esi, 0
push esi
push dword [ebp - 0x10c]
lea esi, [ebp - 0x100]
push esi
push dword [ebp - 0x214]
push dword [ebp + 8]
mov esi, 0x414499
push esi
call fcn.00401016
add esp, 0x18
lea esi, [ebp - 0x100]
push esi
call sub.WSOCK32.dll_gethostbyname
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
je 0x403a64
jmp 0x403a9f
push dword [ebp - 0x214]
mov esi, 0x4144b3
push esi
call fcn.004010b8
add esp, 8
mov esi, 0x4144c1
push esi
mov esi, 0x11
push esi
mov esi, 0x1f6
push esi
push dword [ebp + 8]
call fcn.00401708
add esp, 0x10
jmp 0x4043cf
mov word [ebp - 0x22c], 2
mov esi, 0xa
add esi, dword [ebp - 0x21c]
mov ax, word [esi]
cwde
push eax
mov esi, 0xc
add esi, dword [ebp - 0x21c]
mov edi, dword [esi]
push dword [edi]
lea esi, [ebp - 0x228]
push esi
call fcn.00408ba0
add esp, 0xc
push dword [ebp - 0x10c]
call sub.WSOCK32.dll_htons
movzx ebx, ax
mov word [ebp - 0x22a], bx
mov dword [ebp - 0x23c], 0x10
mov esi, 0
push esi
mov esi, 1
push esi
mov esi, 2
push esi
call sub.WSOCK32.dll_socket
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
mov esi, 1
jg 0x403b29
mov esi, 0
cmp esi, 0
je 0x403b37
jmp 0x403b55
push dword [ebp - 0x214]
mov esi, 0x4144d3
push esi
call fcn.004010b8
add esp, 8
jmp 0x4043cf
push dword [ebp - 0x23c]
lea esi, [ebp - 0x22c]
push esi
push dword [ebp - 0x214]
call sub.WSOCK32.dll_connect
mov esi, 0xffffffff
cmp esi, eax
je 0x403b7f
jmp 0x403bbf
push dword [ebp - 0x214]
mov esi, 0x4144da
push esi
call fcn.004010b8
add esp, 8
mov esi, 0x4144e9
push esi
mov esi, 0x11
push esi
mov esi, 0x1f7
push esi
push dword [ebp + 8]
call fcn.00401708
add esp, 0x10
mov dword [ebp - 0x108], 1
jmp 0x403bbf
cmp dword [ebp - 0x108], 0
je 0x403bd1
jmp 0x403c63
mov esi, 0
push esi
push dword [ebp - 0x10c]
lea esi, [ebp - 0x100]
push esi
push dword [ebp - 0x214]
push dword [ebp - 0x214]
push dword [ebp + 8]
mov esi, 0x4144fb
push esi
call fcn.00401016
add esp, 0x1c
mov esi, 0
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.00408480
add esp, 4
push eax
lea esi, [ebp - 0x2240]
push esi
push dword [ebp - 0x214]
call sub.WSOCK32.dll_send
mov esi, 0
cmp esi, eax
jg 0x403c3b
jmp 0x403c5e
push dword [ebp - 0x214]
mov esi, 0x41451c
push esi
call fcn.004010b8
add esp, 8
mov dword [ebp - 0x108], 1
jmp 0x403c5e
jmp 0x403c63
cmp dword [ebp - 0x108], 0
je 0x403c75
jmp 0x4042fd
mov esi, 0
push esi
push dword [ebp - 0x10c]
lea esi, [ebp - 0x100]
push esi
push dword [ebp - 0x214]
push dword [ebp - 0x214]
push dword [ebp + 8]
mov esi, 0x414523
push esi
call fcn.00401016
add esp, 0x1c
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x210], 0
cmp dword [ebp - 0x210], 0x40
jb 0x403ccb
jmp 0x403cf7
mov esi, dword [ebp - 0x210]
inc dword [ebp - 0x210]
mov eax, esi
mov esi, 4
imul esi
lea esi, [ebp - 0x20c]
add eax, esi
mov esi, dword [ebp - 0x214]
mov ebx, eax
mov dword [ebx], esi
jmp 0x403cf7
mov esi, 0
cmp esi, 0
je 0x403d07
jmp 0x403cb9
cmp dword [ebp - 0x210], 0x40
jb 0x403d19
jmp 0x403d42
mov esi, dword [ebp - 0x210]
inc dword [ebp - 0x210]
mov eax, esi
mov esi, 4
imul esi
lea esi, [ebp - 0x20c]
add eax, esi
mov esi, dword [ebp + 8]
mov ebx, eax
mov dword [ebx], esi
jmp 0x403d42
mov esi, 0
cmp esi, 0
je 0x403d52
jmp 0x403d07
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x234], 0x14
lea esi, [ebp - 0x234]
push esi
lea esi, [ebp - 0x210]
push esi
mov esi, 0
push esi
lea esi, [ebp - 0x210]
push esi
mov esi, dword [ebp - 0x214]
cmp esi, dword [ebp + 8]
jg 0x403d95
jmp 0x403da0
mov esi, dword [ebp - 0x214]
jmp 0x403da3
mov esi, dword [ebp + 8]
add esi, 1
push esi
call sub.WSOCK32.dll_select
mov dword [ebp - 0x240], eax
lea esi, [ebp - 0x210]
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll___WSAFDIsSet
cmp eax, 0
jne 0x403dcf
jmp 0x403f22
cmp dword [ebp - 0x218], 0
je 0x403de1
jmp 0x403f13
mov esi, 0x2000
push esi
mov esi, 0
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.004084d0
add esp, 0xc
mov esi, 0
push esi
mov esi, 0x2000
push esi
lea esi, [ebp - 0x2240]
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll_recv
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
je 0x403e2f
jmp 0x403e5e
mov esi, 0
push esi
push dword [ebp + 8]
push dword [ebp - 0x214]
push dword [ebp + 8]
mov esi, 0x41453c
push esi
call fcn.00401016
add esp, 0x14
mov dword [ebp - 0x108], 1
jmp 0x403e5e
cmp dword [ebp - 0x238], 0
jl 0x403e70
jmp 0x403e9a
push dword [ebp + 8]
mov esi, 0x41455b
push esi
call fcn.004010b8
add esp, 8
mov dword [ebp - 0x108], 1
mov dword [ebp - 0x238], 0
jmp 0x403e9a
cmp dword [ebp - 0x238], 0
jg 0x403eac
jmp 0x403ecf
mov esi, 0
push esi
push dword [ebp - 0x238]
lea esi, [ebp - 0x2240]
push esi
push dword [ebp - 0x214]
call sub.WSOCK32.dll_send
jmp 0x403ecf
cmp dword [ebp - 0x238], 0
jl 0x403ee1
jmp 0x403f0e
push dword [ebp - 0x214]
mov esi, 0x41457b
push esi
call fcn.004010b8
add esp, 8
mov dword [ebp - 0x108], 1
mov dword [ebp - 0x238], 0
jmp 0x403f0e
jmp 0x403f1d
mov dword [ebp - 0x108], 1
jmp 0x403f22
lea esi, [ebp - 0x210]
push esi
push dword [ebp - 0x214]
call sub.WSOCK32.dll___WSAFDIsSet
cmp eax, 0
jne 0x403f42
jmp 0x4042e6
mov dword [ebp - 0x218], 1
mov esi, 0x2000
push esi
mov esi, 0
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.004084d0
add esp, 0xc
mov esi, 0
push esi
mov esi, 0x2000
push esi
lea esi, [ebp - 0x2240]
push esi
push dword [ebp - 0x214]
call sub.WSOCK32.dll_recv
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 0
jl 0x403f9d
jmp 0x403fca
push dword [ebp - 0x214]
mov esi, 0x41459d
push esi
call fcn.004010b8
add esp, 8
mov dword [ebp - 0x108], 1
mov dword [ebp - 0x238], 0
jmp 0x403fca
cmp dword [ebp - 0x238], 0
jg 0x403fdc
jmp 0x4042a5
mov esi, 0x4145be
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.00408cf0
add esp, 8
mov dword [ebp - 0x224c], eax
mov esi, 0x4145c3
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.00408cf0
add esp, 8
mov dword [ebp - 0x2250], eax
mov esi, 0x4145d8
push esi
call fcn.00408480
add esp, 4
mov dword [ebp - 0x2254], eax
mov esi, dword [ebp - 0x238]
mov dword [ebp - 0x2258], esi
mov eax, dword [ebp - 0x2258]
mov esi, 1
imul esi
lea esi, [ebp - 0x2240]
add eax, esi
mov ebx, eax
mov byte [ebx], 0
cmp dword [ebp - 0x224c], 0
jne 0x40405e
jmp 0x404072
mov esi, dword [ebp - 0x224c]
add esi, 2
mov dword [ebp - 0x224c], esi
jmp 0x404072
cmp dword [ebp - 0x224c], 0
jne 0x404084
jmp 0x4040ca
mov esi, 6
push esi
mov esi, 0x4146a7
push esi
lea esi, [ebp - 0x2240]
push esi
call fcn.00408708
add esp, 0xc
cmp eax, 0
mov esi, 1
je 0x4040b2
mov esi, 0
cmp esi, 0
jne 0x4040c0
jmp 0x4040ca
mov esi, 1
jmp 0x4040cf
mov esi, 0
cmp esi, 0
jne 0x4040dd
jmp 0x404153
cmp dword [ebp - 0x2250], 0
mov esi, 1
je 0x4040f4
mov esi, 0
cmp esi, 0
je 0x404102
jmp 0x404136
mov esi, dword [ebp - 0x2250]
cmp esi, dword [ebp - 0x224c]
mov esi, 1
jg 0x40411e
mov esi, 0
cmp esi, 0
je 0x40412c
jmp 0x404136
mov esi, 0
jmp 0x40413b
mov esi, 1
cmp esi, 0
jne 0x404149
jmp 0x404153
mov esi, 1
jmp 0x404158
mov esi, 0
cmp esi, 0
jne 0x404166
jmp 0x40427f
mov esi, 0
push esi
push dword [ebp - 0x214]
push dword [ebp + 8]
mov esi, 0x4146ae
push esi
call fcn.00401016
add esp, 0x10
lea edi, [ebp - 0x2240]
mov esi, edi
neg esi
add esi, dword [ebp - 0x224c]
mov eax, esi
mov esi, 1
cdq
idiv esi
neg eax
add eax, dword [ebp - 0x2258]
push eax
push dword [ebp - 0x224c]
mov eax, dword [ebp - 0x2254]
mov esi, 1
imul esi
add eax, dword [ebp - 0x224c]
push eax
call fcn.00408ba0
add esp, 0xc
push dword [ebp - 0x2254]
mov esi, 0x4146df
push esi
push dword [ebp - 0x224c]
call fcn.00408ba0
add esp, 0xc
mov esi, dword [ebp - 0x2258]
add esi, dword [ebp - 0x2254]
mov eax, esi
mov esi, 1
imul esi
lea esi, [ebp - 0x2240]
add eax, esi
mov ebx, eax
mov byte [ebx], 0
mov esi, dword [ebp - 0x2258]
add esi, dword [ebp - 0x2254]
mov dword [ebp - 0x238], esi
cmp dword [ebp - 0x238], 0x2000
mov esi, 1
jl 0x404230
mov esi, 0
cmp esi, 0
je 0x40423e
jmp 0x404275
mov esi, 0x2b3
push esi
mov esi, 0x4147bd
push esi
mov esi, 0x4147ae
push esi
call fcn.00408e01
add esp, 0xc
mov esi, 0
cmp esi, 0
je 0x40426b
jmp 0x404275
mov esi, 0
jmp 0x40427a
mov esi, 1
jmp 0x40427f
mov esi, 0
push esi
push dword [ebp - 0x238]
lea esi, [ebp - 0x2240]
push esi
push dword [ebp + 8]
call sub.WSOCK32.dll_send
mov dword [ebp - 0x238], eax
jmp 0x4042a5
cmp dword [ebp - 0x238], 0
jl 0x4042b7
jmp 0x4042e1
push dword [ebp + 8]
mov esi, 0x4147c6
push esi
call fcn.004010b8
add esp, 8
mov dword [ebp - 0x108], 1
mov dword [ebp - 0x238], 0
jmp 0x4042e1
jmp 0x4042e6
cmp dword [ebp - 0x108], 0
jne 0x4042f8
jmp 0x403caf
jmp 0x4042fd
mov esi, 0
push esi
push dword [ebp - 0x10c]
lea esi, [ebp - 0x100]
push esi
push dword [ebp - 0x214]
push dword [ebp - 0x214]
push dword [ebp + 8]
mov esi, 0x4147e7
push esi
call fcn.00401016
add esp, 0x1c
mov esi, 2
push esi
push dword [ebp - 0x214]
call sub.WSOCK32.dll_shutdown
mov esi, 0xffffffff
cmp esi, eax
je 0x404350
jmp 0x404369
push dword [ebp - 0x214]
mov esi, 0x414803
push esi
call fcn.004010b8
add esp, 8
jmp 0x404369
mov esi, 0
push esi
push dword [ebp - 0x10c]
lea esi, [ebp - 0x100]
push esi
push dword [ebp - 0x214]
push dword [ebp - 0x214]
push dword [ebp + 8]
mov esi, 0x414813
push esi
call fcn.00401016
add esp, 0x1c
push dword [ebp - 0x214]
call sub.WSOCK32.dll_closesocket
mov esi, 0xffffffff
cmp esi, eax
je 0x4043b6
jmp 0x4043cf
push dword [ebp - 0x214]
mov esi, 0x414832
push esi
call fcn.004010b8
add esp, 8
jmp 0x4043cf
pop edi
pop esi
pop ebx
leave
ret