Function at 0x402b40
Capabilities:
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x422ca5
mov eax, dword fs:[0]
push eax
sub esp, 0x488
mov eax, dword [0x42b6d0]
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 ebx, ecx
xor esi, esi
mov dword [ebp - 0x488], ebx
mov dword [ebp - 0x490], esi
mov dword [ebp - 4], esi
cmp dword [ebp + 0x54], 0x10
mov eax, dword [ebp + 0x40]
jae 0x402b8d
lea eax, [ebp + 0x40]
push esi
push esi
push esi
push 1
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x490], eax
cmp eax, esi
jne 0x402c86
mov edi, 0x4f83ea
lea esi, [ebp - 0x46c]
call fcn.00407d80
mov esi, eax
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, esi
mov edi, 0xf
mov ecx, eax
mov dword [ebx + 0x14], edi
mov dword [ebx + 0x10], 0
mov byte [ebx], 0
lea esi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x402be0
sub ecx, esi
push ecx
push eax
mov ecx, ebx
call fcn.00401640
xor eax, eax
mov esi, 0x10
mov dword [ebp - 0x46c], eax
mov dword [ebp - 0x468], eax
mov dword [ebp - 0x464], eax
mov dword [ebp - 0x460], eax
mov dword [ebp - 0x45c], eax
mov dword [ebp - 0x458], eax
mov dword [ebp - 0x454], eax
mov dword [ebp - 0x450], eax
mov word [ebp - 0x44c], ax
cmp dword [ebp + 0x1c], esi
jb 0x402c41
mov eax, dword [ebp + 8]
push eax
call fcn.0040bae1
add esp, 4
mov dword [ebp + 0x1c], edi
mov dword [ebp + 0x18], 0
mov byte [ebp + 8], 0
cmp dword [ebp + 0x38], esi
jb 0x402c60
mov ecx, dword [ebp + 0x24]
push ecx
call fcn.0040bae1
add esp, 4
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x34], 0
mov byte [ebp + 0x24], 0
cmp dword [ebp + 0x54], esi
jb 0x402c7f
mov edx, dword [ebp + 0x40]
push edx
call fcn.0040bae1
add esp, 4
mov eax, ebx
jmp 0x4033b3
mov edx, 7
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x434], edx
mov dword [ebp - 0x438], eax
mov word [ebp - 0x448], cx
xor ebx, ebx
mov byte [ebp - 4], 4
cmp dword [ebp + 0x18], ebx
jbe 0x402d94
cmp dword [ebp + 0x1c], 0x10
mov ecx, dword [ebp + 8]
jae 0x402cbd
lea ecx, [ebp + 8]
movsx cx, byte [ecx + ebx]
movzx edi, cx
or ecx, 0xffffffff
sub ecx, eax
cmp ecx, 1
jbe 0x402d8a
lea esi, [eax + 1]
cmp esi, 0x7ffffffe
ja 0x402d8a
cmp edx, esi
jae 0x402cf6
push eax
push esi
lea edx, [ebp - 0x448]
push edx
call fcn.004076d0
jmp 0x402d16
test esi, esi
jne 0x402d24
mov eax, dword [ebp - 0x448]
mov dword [ebp - 0x438], esi
cmp edx, 8
jae 0x402d11
lea eax, [ebp - 0x448]
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x438]
mov edx, dword [ebp - 0x434]
test esi, esi
setne cl
test cl, cl
je 0x402d6d
mov ecx, dword [ebp - 0x448]
cmp edx, 8
jae 0x402d3c
lea ecx, [ebp - 0x448]
mov word [ecx + eax*2], di
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x448]
mov dword [ebp - 0x438], esi
jae 0x402d5b
lea eax, [ebp - 0x448]
xor edx, edx
mov word [eax + esi*2], dx
mov edx, dword [ebp - 0x434]
mov eax, dword [ebp - 0x438]
inc ebx
cmp ebx, dword [ebp + 0x18]
jb 0x402cb1
cmp edx, 8
jb 0x402d94
mov eax, dword [ebp - 0x448]
mov dword [ebp - 0x48c], eax
jmp 0x402da0
push str.string_too_long
call fcn.0040a698
lea ecx, [ebp - 0x448]
mov dword [ebp - 0x48c], ecx
mov edx, 7
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x418], edx
mov dword [ebp - 0x41c], eax
mov word [ebp - 0x42c], cx
xor ebx, ebx
mov byte [ebp - 4], 5
cmp dword [ebp + 0x34], ebx
jbe 0x402e99
jmp 0x402dd0
cmp dword [ebp + 0x38], 0x10
mov ecx, dword [ebp + 0x24]
jae 0x402ddc
lea ecx, [ebp + 0x24]
movsx cx, byte [ecx + ebx]
movzx edi, cx
or ecx, 0xffffffff
sub ecx, eax
cmp ecx, 1
jbe 0x402d8a
lea esi, [eax + 1]
cmp esi, 0x7ffffffe
ja 0x402d8a
cmp edx, esi
jae 0x402e0d
push eax
push esi
lea edx, [ebp - 0x42c]
push edx
call fcn.004076d0
jmp 0x402e2d
test esi, esi
jne 0x402e3b
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x41c], esi
cmp edx, 8
jae 0x402e28
lea eax, [ebp - 0x42c]
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x41c]
mov edx, dword [ebp - 0x418]
test esi, esi
setne cl
test cl, cl
je 0x402e84
mov ecx, dword [ebp - 0x42c]
cmp edx, 8
jae 0x402e53
lea ecx, [ebp - 0x42c]
mov word [ecx + eax*2], di
cmp dword [ebp - 0x418], 8
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x41c], esi
jae 0x402e72
lea eax, [ebp - 0x42c]
xor edx, edx
mov word [eax + esi*2], dx
mov edx, dword [ebp - 0x418]
mov eax, dword [ebp - 0x41c]
inc ebx
cmp ebx, dword [ebp + 0x34]
jb 0x402dd0
mov esi, dword [ebp - 0x42c]
cmp edx, 8
jae 0x402e9f
lea esi, [ebp - 0x42c]
mov eax, dword [ebp - 0x48c]
mov ecx, dword [ebp - 0x490]
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
cmp eax, ebx
jne 0x402ff7
mov ecx, 0x44
xor eax, eax
lea esp, [esp]
mov dl, byte [eax + str._r2_:__]
xor dl, cl
inc ecx
and ecx, 0x800000ff
mov byte [ebp + eax - 0x478], dl
jns 0x402ef0
dec ecx
or ecx, 0xffffff00
inc ecx
inc eax
cmp eax, 0x2b
jl 0x402ed0
mov byte [ebp - 0x44d], bl
mov esi, dword [ebp - 0x488]
mov byte [ebp - 4], 6
mov edi, 0xf
lea eax, [ebp - 0x478]
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov byte [esi], 0
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402f20
sub eax, edx
push eax
lea eax, [ebp - 0x478]
push eax
mov ecx, esi
call fcn.00401640
push 0x2c
lea ecx, [ebp - 0x478]
push ebx
push ecx
call fcn.004142f0
add esp, 0xc
cmp dword [ebp - 0x418], 8
jb 0x402f62
mov edx, dword [ebp - 0x42c]
push edx
call fcn.0040bae1
add esp, 4
xor eax, eax
cmp dword [ebp - 0x434], 8
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], ebx
mov word [ebp - 0x42c], ax
jb 0x402f93
mov ecx, dword [ebp - 0x448]
push ecx
call fcn.0040bae1
add esp, 4
xor edx, edx
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x434], 7
mov dword [ebp - 0x438], ebx
mov word [ebp - 0x448], dx
jb 0x402fbe
mov eax, dword [ebp + 8]
push eax
call fcn.0040bae1
add esp, 4
cmp dword [ebp + 0x38], 0x10
mov dword [ebp + 0x1c], edi
mov dword [ebp + 0x18], ebx
mov byte [ebp + 8], 0
jb 0x402fda
mov ecx, dword [ebp + 0x24]
push ecx
call fcn.0040bae1
add esp, 4
cmp dword [ebp + 0x54], 0x10
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x34], ebx
mov byte [ebp + 0x24], 0
jb 0x4033b1
mov edx, dword [ebp + 0x40]
push edx
jmp 0x4033a9
push ebx
push ebx
lea ecx, [ebp - 0x494]
push ecx
push ebx
push ebx
push esi
push 0x427614
push eax
mov dword [ebp - 0x494], str.text_
mov dword [ebp - 0x490], ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
cmp esi, ebx
jne 0x403164
mov ecx, 0x44
xor eax, eax
mov dl, byte [eax + str._f127_a9__]
xor dl, cl
inc ecx
and ecx, 0x800000ff
mov byte [ebp + eax - 0x478], dl
jns 0x403050
dec ecx
or ecx, 0xffffff00
inc ecx
inc eax
cmp eax, 0x2a
jl 0x403030
mov byte [ebp - 0x44e], bl
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp + eax - 0x478]
mov eax, dword [ebp - 0x488]
mov edi, 0xf
mov dword [eax + 0x14], edi
mov dword [eax + 0x10], ebx
mov byte [eax], 0
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403086
sub eax, esi
push eax
push ecx
mov ecx, dword [ebp - 0x488]
call fcn.00401640
push 0x2b
lea eax, [ebp - 0x478]
push ebx
push eax
call fcn.004142f0
add esp, 0xc
cmp dword [ebp - 0x418], 8
jb 0x4030c6
mov ecx, dword [ebp - 0x42c]
push ecx
call fcn.0040bae1
add esp, 4
xor edx, edx
cmp dword [ebp - 0x434], 8
mov esi, 7
mov word [ebp - 0x42c], dx
mov dword [ebp - 0x41c], ebx
mov dword [ebp - 0x418], esi
jb 0x4030f8
mov eax, dword [ebp - 0x448]
push eax
call fcn.0040bae1
add esp, 4
mov dword [ebp - 0x434], esi
xor ecx, ecx
mov esi, 0x10
mov word [ebp - 0x448], cx
mov dword [ebp - 0x438], ebx
cmp dword [ebp + 0x1c], esi
jb 0x403123
mov edx, dword [ebp + 8]
push edx
call fcn.0040bae1
add esp, 4
mov byte [ebp + 8], 0
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x1c], edi
cmp dword [ebp + 0x38], esi
jb 0x40313e
mov eax, dword [ebp + 0x24]
push eax
call fcn.0040bae1
add esp, 4
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x34], ebx
mov byte [ebp + 0x24], 0
cmp dword [ebp + 0x54], esi
jb 0x403159
mov ecx, dword [ebp + 0x40]
push ecx
call fcn.0040bae1
add esp, 4
mov eax, dword [ebp - 0x488]
jmp 0x4033b3
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
cmp eax, ebx
jne 0x4031f9
mov ecx, 0x43
xor eax, eax
mov edi, edi
mov dl, byte [eax + 0x427648]
xor dl, cl
inc ecx
and ecx, 0x800000ff
mov byte [ebp + eax - 0x484], dl
jns 0x4031a0
dec ecx
or ecx, 0xffffff00
inc ecx
inc eax
cmp eax, 0x39
jl 0x403180
mov byte [ebp - 0x44b], bl
mov byte [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp + eax - 0x484]
mov eax, dword [ebp - 0x488]
mov edi, 0xf
mov dword [eax + 0x14], edi
mov dword [eax + 0x10], ebx
mov byte [eax], 0
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4031d6
sub eax, esi
push eax
push ecx
mov ecx, dword [ebp - 0x488]
call fcn.00401640
push 0x3a
lea eax, [ebp - 0x484]
jmp 0x4030a4
mov edi, 0xf
mov dword [ebp - 0x454], edi
mov dword [ebp - 0x458], ebx
mov byte [ebp - 0x468], bl
lea edx, [ebp - 0x48c]
push edx
push 0x400
lea eax, [ebp - 0x410]
push eax
mov byte [ebp - 4], 9
push esi
mov dword [ebp - 0x48c], 0xffffffff
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, dword [ebp - 0x48c]
push ecx
lea eax, [ebp - 0x410]
lea ecx, [ebp - 0x468]
call fcn.00404bb0
mov esi, dword [ebp - 0x488]
lea edx, [ebp - 0x468]
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov byte [esi], 0
cmp esi, edx
je 0x4032da
cmp dword [esi + 0x14], 0x10
jb 0x40327a
mov eax, dword [esi]
push eax
call fcn.0040bae1
add esp, 4
mov dword [esi + 0x14], edi
mov dword [esi + 0x10], ebx
mov byte [esi], 0
cmp dword [ebp - 0x454], 0x10
jae 0x4032b8
mov ecx, dword [ebp - 0x458]
inc ecx
push ecx
lea edx, [ebp - 0x468]
push edx
push esi
call fcn.0040b300
mov ecx, dword [ebp - 0x458]
mov edx, dword [ebp - 0x454]
add esp, 0xc
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], edx
jmp 0x4032f2
mov eax, dword [ebp - 0x468]
mov ecx, dword [ebp - 0x458]
mov edx, dword [ebp - 0x454]
mov dword [esi], eax
mov dword [ebp - 0x468], ebx
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], edx
jmp 0x4032f2
cmp dword [ebp - 0x454], 0x10
jb 0x4032f2
mov eax, dword [ebp - 0x468]
push eax
call fcn.0040bae1
add esp, 4
cmp dword [ebp - 0x418], 8
mov dword [ebp - 0x454], edi
mov dword [ebp - 0x458], ebx
mov byte [ebp - 0x468], 0
jb 0x40331d
mov ecx, dword [ebp - 0x42c]
push ecx
call fcn.0040bae1
add esp, 4
xor edx, edx
cmp dword [ebp - 0x434], 8
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], ebx
mov word [ebp - 0x42c], dx
jb 0x40334e
mov eax, dword [ebp - 0x448]
push eax
call fcn.0040bae1
add esp, 4
xor ecx, ecx
cmp dword [ebp + 0x1c], 0x10
mov dword [ebp - 0x434], 7
mov dword [ebp - 0x438], ebx
mov word [ebp - 0x448], cx
jb 0x403379
mov edx, dword [ebp + 8]
push edx
call fcn.0040bae1
add esp, 4
cmp dword [ebp + 0x38], 0x10
mov dword [ebp + 0x1c], edi
mov dword [ebp + 0x18], ebx
mov byte [ebp + 8], 0
jb 0x403395
mov eax, dword [ebp + 0x24]
push eax
call fcn.0040bae1
add esp, 4
cmp dword [ebp + 0x54], 0x10
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x34], ebx
mov byte [ebp + 0x24], 0
jb 0x4033b1
mov ecx, dword [ebp + 0x40]
push ecx
call fcn.0040bae1
add esp, 4
mov eax, esi
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.0040b172
mov esp, ebp
pop ebp
ret