Function at 0x421b30
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Initialize winsock library
Receive data
Receive data on socket
Reference http user-agent string
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push 0xffffffffffffffff
push 0x48b033
mov eax, dword fs:[0]
push eax
mov eax, 0x14b4
call fcn.0045c270
mov eax, dword [0x4ada80]
xor eax, esp
mov dword [esp + 0x14b0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ada80]
xor eax, esp
push eax
lea eax, [esp + 0x14c8]
mov dword fs:[0], eax
mov eax, dword [esp + 0x14d8]
mov dword [esp + 0x14], eax
xor ebx, ebx
mov dword [esp + 0x14d0], ebx
xor edx, edx
mov eax, ecx
mov dword [esp + 0x2a4], 7
mov dword [esp + 0x2a0], ebx
mov word [esp + 0x290], dx
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x421ba4
sub eax, esi
sar eax, 1
push eax
push ecx
lea ecx, [esp + 0x294]
call fcn.00405dc0
mov byte [esp + 0x14d0], 1
lea esp, [esp]
mov edi, dword [esp + 0x14]
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x294]
lea esi, [edi + 0x14]
push eax
mov ecx, esi
mov dword [esp + 0x28], ebx
mov dword [edi + 0x7c], 0xffffffff
mov dword [esp + 0x48], ebx
mov dword [esp + 0x44], ebx
call fcn.00405f80
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x14e4]
push ecx
lea ebp, [edi + 0x30]
mov ecx, ebp
call fcn.00405f80
cmp dword [edi + 0x44], ebx
jne 0x421ccb
push 0x49bffc
mov ebx, 1
mov eax, esi
call fcn.00424300
mov edi, eax
cmp edi, 0xffffffff
je 0x421cc5
lea edx, [edi + 1]
mov ecx, esi
lea eax, [esp + 0x254]
call fcn.0042d430
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebp
mov byte [esp + 0x14dc], 2
call fcn.00405f80
mov byte [esp + 0x14d0], bl
mov ebx, 8
cmp dword [esp + 0x26c], ebx
jb 0x421c80
mov edx, dword [esp + 0x258]
push edx
call fcn.00438e87
add esp, 4
mov ecx, edi
mov edx, esi
lea eax, [esp + 0x254]
call fcn.0042d400
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
mov byte [esp + 0x14dc], 3
call fcn.00405f80
mov byte [esp + 0x14d0], 1
cmp dword [esp + 0x26c], ebx
jb 0x421cc5
mov eax, dword [esp + 0x258]
push eax
call fcn.00438e87
add esp, 4
mov edi, dword [esp + 0x14]
xor ebx, ebx
mov ecx, dword [edi + 0xc]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x421ce7
mov dword [esp + 0x1c], 1
jmp 0x422c97
mov eax, 7
xor edx, edx
mov dword [esp + 0x250], eax
mov dword [esp + 0x24c], ebx
mov word [esp + 0x23c], dx
xor ecx, ecx
mov dword [esp + 0x18c], eax
mov dword [esp + 0x188], ebx
mov word [esp + 0x178], cx
mov dword [esp + 0x1a8], eax
mov dword [esp + 0x1a4], ebx
mov word [esp + 0x194], dx
lea eax, [esp + 0x190]
push eax
lea ecx, [esp + 0x178]
push ecx
lea edx, [esp + 0x240]
push edx
lea edx, [esp + 0x58]
lea edi, [esp + 0x4c]
mov ecx, esi
mov byte [esp + 0x14dc], 6
call fcn.004219e0
mov dword [esp + 0x2c8], 0xffffffff
cmp byte [0x4b2fec], bl
jne 0x421d91
lea eax, [esp + 0x2cc]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
cmp eax, ebx
jne 0x421d91
mov byte [0x4b2fec], 1
mov ecx, dword [esp + 0x14]
mov byte [esp + 0x14d0], 7
mov edx, dword [ecx + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
push edx
call edi
test eax, eax
jne 0x421e50
mov esi, 8
mov dword [esp + 0x1c], 1
cmp dword [esp + 0x1a8], esi
jb 0x421dd8
mov eax, dword [esp + 0x194]
push eax
call fcn.00438e87
add esp, 4
xor ecx, ecx
mov edi, 7
mov dword [esp + 0x1a8], edi
mov dword [esp + 0x1a4], ebx
mov word [esp + 0x194], cx
cmp dword [esp + 0x18c], esi
jb 0x421e0e
mov edx, dword [esp + 0x178]
push edx
call fcn.00438e87
add esp, 4
xor eax, eax
mov byte [esp + 0x14d0], 1
mov dword [esp + 0x18c], edi
mov dword [esp + 0x188], ebx
mov word [esp + 0x178], ax
cmp dword [esp + 0x250], esi
jb 0x422c97
mov ecx, dword [esp + 0x23c]
push ecx
call fcn.00438e87
add esp, 4
jmp 0x422c97
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
jne 0x421f09
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_socket_error__d.__r_n
call fcn.00459477
add esp, 8
mov esi, 8
cmp dword [esp + 0x1a8], esi
jb 0x421e99
mov edx, dword [esp + 0x194]
push edx
call fcn.00438e87
add esp, 4
xor eax, eax
mov edi, 7
mov word [esp + 0x194], ax
mov dword [esp + 0x1a4], ebx
mov dword [esp + 0x1a8], edi
cmp dword [esp + 0x18c], esi
jb 0x421ecf
mov ecx, dword [esp + 0x178]
push ecx
call fcn.00438e87
add esp, 4
xor edx, edx
mov byte [esp + 0x14d0], 1
mov dword [esp + 0x18c], edi
mov dword [esp + 0x188], ebx
mov word [esp + 0x178], dx
cmp dword [esp + 0x250], esi
jb 0x422c70
mov eax, dword [esp + 0x23c]
push eax
jmp 0x422c68
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0xc]
push ebx
push edx
call edi
test eax, eax
jne 0x421fb2
mov dword [esp + 0x1c], 1
mov esi, 8
cmp dword [esp + 0x1a8], esi
jb 0x421f42
mov eax, dword [esp + 0x194]
push eax
call fcn.00438e87
add esp, 4
xor ecx, ecx
mov edi, 7
mov word [esp + 0x194], cx
mov dword [esp + 0x1a4], ebx
mov dword [esp + 0x1a8], edi
cmp dword [esp + 0x18c], esi
jb 0x421f78
mov edx, dword [esp + 0x178]
push edx
call fcn.00438e87
add esp, 4
xor eax, eax
mov byte [esp + 0x14d0], 1
mov dword [esp + 0x18c], edi
mov dword [esp + 0x188], ebx
mov word [esp + 0x178], ax
cmp dword [esp + 0x250], esi
jb 0x422c70
mov ecx, dword [esp + 0x23c]
push ecx
jmp 0x422c68
mov ecx, esi
lea esi, [esp + 0x200]
call fcn.00420a50
lea ecx, [esp + 0x238]
lea esi, [esp + 0x1ac]
mov byte [esp + 0x14d0], 8
call fcn.00420a50
mov ecx, ebp
lea esi, [esp + 0x1e4]
mov byte [esp + 0x14d0], 9
call fcn.00420a50
mov eax, dword [esp + 0x1b0]
mov edi, 0x10
cmp dword [esp + 0x1c4], edi
jae 0x42200d
lea eax, [esp + 0x1b0]
push eax
call sub.WS2_32.dll_gethostbyname
mov esi, eax
cmp esi, ebx
jne 0x4220c4
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._gethostbyname_:_socket_error__d.__r_n
call fcn.00459477
add esp, 8
cmp dword [esp + 0x1fc], edi
jb 0x422049
mov edx, dword [esp + 0x1e8]
push edx
call fcn.00438e87
add esp, 4
mov esi, 0xf
mov byte [esp + 0x1e8], bl
mov dword [esp + 0x1f8], ebx
mov dword [esp + 0x1fc], esi
cmp dword [esp + 0x1c4], edi
jb 0x42207c
mov eax, dword [esp + 0x1b0]
push eax
call fcn.00438e87
add esp, 4
mov byte [esp + 0x1b0], bl
mov dword [esp + 0x1c0], ebx
mov dword [esp + 0x1c4], esi
cmp dword [esp + 0x218], edi
jb 0x4220aa
mov ecx, dword [esp + 0x204]
push ecx
call fcn.00438e87
add esp, 4
mov dword [esp + 0x218], esi
mov dword [esp + 0x214], ebx
mov byte [esp + 0x204], bl
jmp 0x421e7b
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0xc]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x422177
mov dword [esp + 0x1c], 1
cmp dword [esp + 0x1fc], edi
jb 0x4220fc
mov eax, dword [esp + 0x1e8]
push eax
call fcn.00438e87
add esp, 4
mov esi, 0xf
mov byte [esp + 0x1e8], bl
mov dword [esp + 0x1f8], ebx
mov dword [esp + 0x1fc], esi
cmp dword [esp + 0x1c4], edi
jb 0x42212f
mov ecx, dword [esp + 0x1b0]
push ecx
call fcn.00438e87
add esp, 4
mov dword [esp + 0x1c4], esi
mov dword [esp + 0x1c0], ebx
mov byte [esp + 0x1b0], bl
cmp dword [esp + 0x218], edi
jb 0x42215d
mov edx, dword [esp + 0x204]
push edx
call fcn.00438e87
add esp, 4
mov dword [esp + 0x218], esi
mov dword [esp + 0x214], ebx
mov byte [esp + 0x204], bl
jmp 0x421f24
mov edx, 2
mov word [esp + 0x2a8], dx
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov esi, dword [esp + 0x40]
push esi
mov dword [esp + 0x2b0], edx
mov dword [esp + 0x2b4], ebx
mov dword [esp + 0x2b8], ebx
call sub.WS2_32.dll_htons
mov ebp, dword [esp + 0x2c]
mov word [esp + 0x2aa], ax
push edi
lea eax, [esp + 0x2ac]
push eax
push ebp
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x4221fe
mov ebp, dword [esp + 0x1b0]
cmp dword [esp + 0x1c4], edi
jae 0x4221e1
lea ebp, [esp + 0x1b0]
call sub.WS2_32.dll_WSAGetLastError
push eax
movzx ecx, si
push ecx
push ebp
push str._connectAndSendData_:_connect__s:_d_error__d.__r_n
call fcn.00459477
add esp, 0x10
jmp 0x422030
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 0xc]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x42221e
mov dword [esp + 0x1c], 1
jmp 0x422030
mov dword [esp + 0x234], 0xf
mov dword [esp + 0x230], ebx
mov byte [esp + 0x220], bl
mov byte [esp + 0x14d0], 0xb
lea ecx, [esp + 0x21c]
cmp dword [esp + 0x1f8], ebx
jne 0x422258
push 4
push str.GET
jmp 0x42225f
push 5
push str.POST
call fcn.00402050
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x208]
push ecx
lea ecx, [esp + 0x228]
call fcn.00402460
push 0xb
push str._HTTP_1.1_r_n
lea ecx, [esp + 0x224]
call fcn.00402050
push 6
push str.Host:
lea ecx, [esp + 0x224]
call fcn.00402050
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x1b4]
push edx
lea ecx, [esp + 0x228]
call fcn.00402460
push 2
push 0x49c0ac
lea ecx, [esp + 0x224]
call fcn.00402050
push 0xd
push str.Accept:___r_n
lea ecx, [esp + 0x224]
call fcn.00402050
push 0x73
push str.User_Agent:_Mozilla_5.0__Windows_NT_5.1__AppleWebKit_537.31__KHTML__like_Gecko__Chrome_26.0.1410.64_Safari_537.31_r_n
lea ecx, [esp + 0x224]
call fcn.00402050
push 0x18
push str.Connection:_Keep_Alive_r_n
lea ecx, [esp + 0x224]
call fcn.00402050
push 0x31
push 0x49c150
lea ecx, [esp + 0x224]
call fcn.00402050
mov eax, dword [esp + 0x1f8]
cmp eax, ebx
je 0x422360
push eax
lea eax, [esp + 0x460]
push str.Content_Length:__d_r_n
push eax
call fcn.004587f5
lea eax, [esp + 0x468]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x422342
sub eax, edx
push eax
lea ecx, [esp + 0x460]
push ecx
lea ecx, [esp + 0x224]
call fcn.00402050
push 2
push 0x49c0ac
lea ecx, [esp + 0x224]
call fcn.00402050
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x1ec]
push edx
lea ecx, [esp + 0x228]
call fcn.00402460
mov eax, dword [esp + 0x220]
cmp dword [esp + 0x234], edi
jae 0x4223a1
lea eax, [esp + 0x220]
mov ecx, dword [esp + 0x230]
push ebx
push ecx
push eax
push ebp
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
jne 0x42241e
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_send_error__d.__r_n
call fcn.00459477
add esp, 8
cmp dword [esp + 0x234], edi
jb 0x4223e2
mov edx, dword [esp + 0x220]
push edx
call fcn.00438e87
add esp, 4
mov esi, 0xf
mov dword [esp + 0x234], esi
mov dword [esp + 0x230], ebx
mov byte [esp + 0x220], bl
cmp dword [esp + 0x1fc], edi
jb 0x422101
mov eax, dword [esp + 0x1e8]
push eax
call fcn.00438e87
add esp, 4
jmp 0x422101
mov edx, dword [esi + 0xc]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x422458
mov dword [esp + 0x1c], 1
cmp dword [esp + 0x234], edi
jb 0x42244e
mov eax, dword [esp + 0x220]
push eax
call fcn.00438e87
add esp, 4
mov esi, 0xf
jmp 0x422b44
mov dword [esp + 0x288], 0xf
mov dword [esp + 0x284], ebx
mov byte [esp + 0x274], bl
add esi, 0x64
mov byte [esp + 0x14d0], 0xc
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x42248f
push eax
call fcn.00438e87
add esp, 4
mov dword [esi + 8], ebx
mov dword [esi + 4], ebx
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x5c]
add esi, 0x54
cmp eax, ebx
je 0x4224ac
push eax
call fcn.00438e87
add esp, 4
mov dword [esi + 8], ebx
push 0xfff
lea eax, [esp + 0x4c9]
push ebx
push eax
mov dword [esi + 4], ebx
mov byte [esp + 0x4d0], bl
call fcn.0045c9f0
add esp, 0xc
mov dword [esp + 0x34], ebx
mov dword [esp + 0x18], 0xffffffff
mov dword [esp + 0x30], ebx
lea esp, [esp]
mov esi, dword [esp + 0x2c]
lea ecx, [esp + 0x44]
push ecx
push ebx
push ebx
lea edx, [esp + 0x78]
push edx
lea eax, [esi + 1]
push eax
mov dword [esp + 0x58], 0xa
mov dword [esp + 0x5c], 0x3e8
mov dword [esp + 0x84], esi
mov dword [esp + 0x80], 1
call sub.WS2_32.dll_select
cmp eax, ebx
jle 0x422af3
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0xc]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
add edi, 0xc
push ebx
push eax
call ebp
test eax, eax
je 0x422d34
lea ecx, [esp + 0x6c]
push ecx
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x422af3
mov edx, dword [edi]
push ebx
push edx
call ebp
test eax, eax
je 0x422d34
push 0x1000
lea eax, [esp + 0x4c8]
push ebx
push eax
call fcn.0045c9f0
add esp, 0xc
push ebx
push 0x1000
lea ecx, [esp + 0x4cc]
push ecx
mov edx, esi
push edx
call sub.WS2_32.dll_recv
mov ebp, eax
cmp ebp, ebx
jle 0x422af3
mov eax, dword [esp + 0x14]
add eax, 0xc
mov eax, dword [eax]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x422d34
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x14]
lea edi, [ecx + ebp]
add esi, 0x64
call fcn.004246c0
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x6c]
mov ecx, dword [esp + 0x34]
push ebp
lea edx, [esp + 0x4c8]
push edx
add eax, ecx
push eax
call fcn.00460f90
mov ecx, dword [esi + 0x10]
add esp, 0xc
mov dword [esp + 0x34], edi
mov edi, esi
cmp ecx, ebx
je 0x4225ff
fldz
mov edx, dword [ecx]
mov eax, dword [edx + 4]
sub esp, 8
fstp qword [esp]
push ebx
push edi
call eax
mov eax, dword [edi + 0x6c]
mov ecx, dword [esp + 0x34]
lea esi, [eax + ecx]
push str._r_n_r_n
push eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x28], esi
call fcn.004593d0
mov ebp, eax
add esp, 8
cmp ebp, ebx
je 0x422a8e
cmp ebp, esi
jae 0x422a8e
add ebp, 4
cmp dword [edi + 0x7c], 0xffffffff
mov dword [esp + 0x30], ebp
jne 0x4226ea
mov edx, dword [esp + 0x28]
push str.HTTP_1.1
push edx
call fcn.004593d0
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x4226ea
cmp esi, dword [esp + 0x20]
jae 0x4226ea
add esi, 9
push 0x49c1d8
push esi
call fcn.004593d0
add esp, 8
cmp eax, ebx
je 0x4226ea
cmp eax, dword [esp + 0x20]
jae 0x4226ea
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x1d0]
mov dword [esp + 0x1e8], 0xf
mov dword [esp + 0x1e4], ebx
mov byte [esp + 0x1d4], bl
call fcn.00402160
cmp dword [esp + 0x1e0], 0x10
mov eax, dword [esp + 0x1cc]
jae 0x4226c4
lea eax, [esp + 0x1cc]
push eax
call fcn.0045946c
add esp, 4
cmp dword [esp + 0x1e0], 0x10
mov dword [edi + 0x7c], eax
jb 0x4226ea
mov eax, dword [esp + 0x1cc]
push eax
call fcn.00438e87
add esp, 4
mov eax, dword [edi + 0x7c]
cmp eax, 0x12e
je 0x4226ff
cmp eax, 0x12d
jne 0x4227b7
cmp dword [esp + 0x284], ebx
jne 0x422d41
mov ecx, dword [esp + 0x28]
push str.Location:
push ecx
call fcn.004593d0
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x4227b7
cmp esi, dword [esp + 0x20]
jae 0x4227b7
add esi, 0xa
push 0x49c0ac
push esi
call fcn.004593d0
add esp, 8
cmp eax, ebx
je 0x4227b7
cmp eax, dword [esp + 0x20]
jae 0x4227b7
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x1d0]
mov dword [esp + 0x1e8], 0xf
mov dword [esp + 0x1e4], ebx
mov byte [esp + 0x1d4], bl
call fcn.00402160
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x1d0]
push edx
lea ecx, [esp + 0x27c]
mov byte [esp + 0x14dc], 0xd
call fcn.00401d40
mov byte [esp + 0x14d0], 0xc
cmp dword [esp + 0x1e0], 0x10
jb 0x4227b7
mov eax, dword [esp + 0x1cc]
push eax
call fcn.00438e87
add esp, 4
cmp dword [esp + 0x284], ebx
jne 0x422d41
cmp dword [esp + 0x18], 0xffffffff
jne 0x422a8e
mov ecx, dword [esp + 0x28]
push str.Content_Length:
push ecx
call fcn.004593d0
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x42287b
mov edi, dword [esp + 0x20]
cmp esi, edi
jae 0x42287b
add esi, 0x10
push 0x49c0ac
push esi
call fcn.004593d0
add esp, 8
cmp eax, ebx
je 0x42287b
cmp eax, edi
jae 0x42287b
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x1d0]
mov dword [esp + 0x1e8], 0xf
mov dword [esp + 0x1e4], ebx
mov byte [esp + 0x1d4], bl
call fcn.00402160
mov eax, dword [esp + 0x1cc]
mov esi, 0x10
cmp dword [esp + 0x1e0], esi
jae 0x422855
lea eax, [esp + 0x1cc]
push eax
call fcn.0045946c
add esp, 4
mov dword [esp + 0x18], eax
cmp dword [esp + 0x1e0], esi
jb 0x42287b
mov edx, dword [esp + 0x1cc]
push edx
call fcn.00438e87
add esp, 4
cmp dword [esp + 0x18], 0xffffffff
jne 0x422a8e
push 0x49c0ac
push ebp
call fcn.004593d0
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x42292a
cmp esi, dword [esp + 0x20]
jae 0x42292a
sub eax, ebp
push eax
push ebp
lea ecx, [esp + 0x1d0]
mov dword [esp + 0x1e8], 0xf
mov dword [esp + 0x1e4], ebx
mov byte [esp + 0x1d4], bl
call fcn.00402160
mov eax, dword [esp + 0x1cc]
mov edi, 0x10
cmp dword [esp + 0x1e0], edi
jae 0x4228ed
lea eax, [esp + 0x1cc]
lea ecx, [esp + 0x18]
push ecx
push 0x49c1fc
push eax
call fcn.0045903d
add esp, 0xc
cmp eax, 1
jne 0x422911
add dword [esp + 0x18], 7
add esi, 2
mov dword [esp + 0x30], esi
cmp dword [esp + 0x1e0], edi
jb 0x42292a
mov edx, dword [esp + 0x1cc]
push edx
call fcn.00438e87
add esp, 4
cmp dword [esp + 0x18], 0xffffffff
jne 0x422a8e
mov eax, dword [esp + 0x28]
push str.Connection:
push eax
call fcn.004593d0
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x422a8e
cmp esi, dword [esp + 0x20]
jae 0x422a8e
add esi, 0xc
push 0x49c0ac
push esi
call fcn.004593d0
add esp, 8
cmp eax, ebx
je 0x422a8e
cmp eax, dword [esp + 0x20]
jae 0x422a8e
sub eax, esi
push eax
push esi
lea ecx, [esp + 0x1d0]
mov dword [esp + 0x1e8], 0xf
mov dword [esp + 0x1e4], ebx
mov byte [esp + 0x1d4], bl
call fcn.00402160
mov byte [esp + 0x14d0], 0xf
mov eax, dword [esp + 0x1cc]
mov edi, 0x10
cmp dword [esp + 0x1e0], edi
jae 0x4229cb
lea eax, [esp + 0x1cc]
lea ecx, [esp + 0x254]
call fcn.00420a10
mov byte [esp + 0x14d0], 0x10
xor ecx, ecx
push 5
mov word [esp + 0x58], cx
mov ebp, 7
push str.CLOSE
lea ecx, [esp + 0x58]
mov dword [esp + 0x70], ebp
mov dword [esp + 0x6c], ebx
call fcn.00405dc0
lea eax, [esp + 0x50]
lea esi, [esp + 0x254]
call fcn.0042d2c0
test eax, eax
mov esi, 8
sete byte [esp + 0x27]
cmp dword [esp + 0x68], esi
jb 0x422a32
mov edx, dword [esp + 0x54]
push edx
call fcn.00438e87
add esp, 4
cmp byte [esp + 0x27], bl
je 0x422a3c
mov dword [esp + 0x18], ebx
cmp dword [esp + 0x26c], esi
jb 0x422a55
mov eax, dword [esp + 0x258]
push eax
call fcn.00438e87
add esp, 4
xor ecx, ecx
mov byte [esp + 0x14d0], 0xc
mov dword [esp + 0x26c], ebp
mov dword [esp + 0x268], ebx
mov word [esp + 0x258], cx
cmp dword [esp + 0x1e0], edi
jb 0x422a8e
mov edx, dword [esp + 0x1cc]
push edx
call fcn.00438e87
add esp, 4
cmp dword [esp + 0x30], ebx
je 0x4224e0
mov edi, dword [esp + 0x18]
cmp edi, ebx
jle 0x4224e0
mov ebp, dword [esp + 0x30]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
mov eax, ebp
sub eax, edx
sub ecx, edx
add eax, edi
cmp ecx, eax
jl 0x4224e0
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x7c], 0xc8
jne 0x422ad5
mov dword [esp + 0x3c], 1
lea esi, [eax + 0x54]
call fcn.004246c0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov eax, dword [edx + 0x5c]
push ecx
push ebp
push eax
call fcn.00460f90
add esp, 0xc
mov edi, 0x10
cmp dword [esp + 0x288], edi
jb 0x422b11
mov edx, dword [esp + 0x274]
push edx
call fcn.00438e87
add esp, 4
mov esi, 0xf
mov dword [esp + 0x288], esi
mov dword [esp + 0x284], ebx
mov byte [esp + 0x274], bl
cmp dword [esp + 0x234], edi
jb 0x422b44
mov eax, dword [esp + 0x220]
push eax
call fcn.00438e87
add esp, 4
mov byte [esp + 0x220], bl
mov dword [esp + 0x230], ebx
mov dword [esp + 0x234], esi
cmp dword [esp + 0x1fc], edi
jb 0x422b72
mov ecx, dword [esp + 0x1e8]
push ecx
call fcn.00438e87
add esp, 4
mov byte [esp + 0x1e8], bl
mov dword [esp + 0x1f8], ebx
mov dword [esp + 0x1fc], esi
cmp dword [esp + 0x1c4], edi
jb 0x422ba0
mov edx, dword [esp + 0x1b0]
push edx
call fcn.00438e87
add esp, 4
mov byte [esp + 0x1b0], bl
mov dword [esp + 0x1c0], ebx
mov dword [esp + 0x1c4], esi
cmp dword [esp + 0x218], edi
jb 0x422bce
mov eax, dword [esp + 0x204]
push eax
call fcn.00438e87
add esp, 4
mov dword [esp + 0x218], esi
mov esi, 8
mov byte [esp + 0x204], bl
mov dword [esp + 0x214], ebx
cmp dword [esp + 0x1a8], esi
jb 0x422c01
mov ecx, dword [esp + 0x194]
push ecx
call fcn.00438e87
add esp, 4
xor edx, edx
mov edi, 7
mov word [esp + 0x194], dx
mov dword [esp + 0x1a4], ebx
mov dword [esp + 0x1a8], edi
cmp dword [esp + 0x18c], esi
jb 0x422c37
mov eax, dword [esp + 0x178]
push eax
call fcn.00438e87
add esp, 4
mov byte [esp + 0x14d0], 1
xor ecx, ecx
mov word [esp + 0x178], cx
mov dword [esp + 0x188], ebx
mov dword [esp + 0x18c], edi
cmp dword [esp + 0x250], esi
jb 0x422c70
mov edx, dword [esp + 0x23c]
push edx
call fcn.00438e87
add esp, 4
mov eax, dword [esp + 0x2c]
cmp eax, 0xffffffff
je 0x422c97
push eax
call sub.WS2_32.dll_closesocket
cmp eax, 0xffffffff
jne 0x422c97
call sub.WS2_32.dll_WSAGetLastError
push eax
push str._connectAndSendData_:_closesocket_error__d.__r_n
call fcn.00459477
add esp, 8
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x10]
cmp ecx, ebx
je 0x422db4
cmp dword [esp + 0x1c], ebx
jne 0x422db4
cmp dword [esp + 0x38], ebx
jne 0x421bd0
mov edi, dword [esp + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx]
mov esi, eax
lea eax, [esi + 0xc]
push eax
cmp edi, ebx
sete al
movzx eax, al
push eax
push esi
lea eax, [esp + 0x260]
push eax
call edx
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x298]
mov byte [esp + 0x14dc], 0x11
call fcn.00405f80
mov ebp, 8
mov byte [esp + 0x14d0], 1
cmp dword [esp + 0x26c], ebp
jb 0x422d1a
mov eax, dword [esp + 0x258]
push eax
call fcn.00438e87
add esp, 4
cmp dword [esp + 0x2a0], ebx
je 0x422dc7
add esi, 0x30
call fcn.00423ff0
jmp 0x421bd0
mov dword [esp + 0x1c], 1
jmp 0x422af3
cmp dword [esp + 0x288], 0x10
mov eax, dword [esp + 0x274]
jae 0x422d59
lea eax, [esp + 0x274]
lea ecx, [esp + 0x254]
call fcn.00420a10
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x298]
mov byte [esp + 0x14dc], 0xe
call fcn.00405f80
mov byte [esp + 0x14d0], 0xc
cmp dword [esp + 0x26c], 8
jb 0x422d9f
mov ecx, dword [esp + 0x258]
push ecx
call fcn.00438e87
add esp, 4
lea esi, [edi + 0x30]
call fcn.00423ff0
mov dword [esp + 0x38], 1
jmp 0x422af3
cmp dword [esp + 0x38], ebx
jne 0x421bd0
mov edi, dword [esp + 0x3c]
mov ebp, 8
cmp dword [esp + 0x2a4], ebp
jb 0x422de0
mov ecx, dword [esp + 0x290]
push ecx
call fcn.00438e87
add esp, 4
xor edx, edx
mov dword [esp + 0x2a4], 7
mov dword [esp + 0x2a0], ebx
mov word [esp + 0x290], dx
cmp dword [esp + 0x14f4], ebp
jb 0x422e15
mov eax, dword [esp + 0x14e0]
push eax
call fcn.00438e87
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x14c8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x14b0]
xor ecx, esp
call fcn.00457b41
add esp, 0x14c0
ret 0x20