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

Disassembly:
push 0xffffffffffffffff
push 0x417847
mov eax, dword fs:[0]
push eax
mov eax, 0x3090
call fcn.004091c0
mov eax, dword [0x41d2b0]
xor eax, esp
mov dword [esp + 0x308c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41d2b0]
xor eax, esp
push eax
lea eax, [esp + 0x30a4]
mov dword fs:[0], eax
mov edi, dword [esp + 0x30b8]
mov ebp, dword [esp + 0x30b4]
mov eax, dword [esp + 0x30c0]
xor ebx, ebx
mov esi, ecx
mov ecx, dword [esp + 0x30c4]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], ebx
cmp edi, ebx
je 0x406e18
mov eax, edi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406a10
sub eax, edx
sar eax, 1
je 0x406e18
mov ecx, esi
call fcn.004053a0
push ebx
push ebx
push ebx
push ebx
push str.Http_connect
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [esi + 0xd0], eax
cmp eax, ebx
jne 0x406a75
push 0xc8
add esi, 4
push ebx
push esi
call fcn.004090b0
push 0x41840c
push 0x64
push esi
call fcn.0040912a
add esp, 0x18
push 0x41846c
mov ecx, ebp
call fcn.00402b60
jmp 0x406e32
push edi
lea ecx, [esp + 0x64]
mov dword [esp + 0x1c], 0x50
call fcn.00402140
lea edx, [esp + 0x18]
push edx
lea ebp, [esi + 0x130]
push ebp
lea edi, [esi + 0xf8]
lea eax, [esp + 0x68]
push edi
push eax
mov dword [esp + 0x30bc], ebx
call fcn.00405560
add esp, 0x10
lea ecx, [esp + 0x60]
mov dword [esp + 0x30ac], 0xffffffff
call fcn.00401f80
cmp dword [edi + 0x18], 8
jb 0x406acd
mov edi, dword [edi + 4]
jmp 0x406ad0
add edi, 4
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0xd0]
push ebx
push ebx
push 3
push ebx
push ebx
push ecx
push edi
push edx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [esi + 0xd4], eax
cmp eax, ebx
jne 0x406b17
push 0x4183f4
lea ecx, [esi + 4]
call fcn.00405400
mov esi, dword [esp + 0x14]
push 0x41846c
mov ecx, esi
call fcn.00402b60
mov eax, esi
jmp 0x406e34
mov edi, dword [esp + 0x30bc]
mov ecx, 0x4183d8
cmp edi, 1
je 0x406b2d
mov ecx, str.POST
cmp dword [ebp + 0x18], 8
jb 0x406b38
mov ebp, dword [ebp + 4]
jmp 0x406b3b
add ebp, 4
push ebx
push 0x80000000
push ebx
push ebx
push 0x4183e0
push ebp
push ecx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [esi + 0xd8], eax
cmp eax, ebx
jne 0x406b62
push 0x4183c0
jmp 0x406af8
xor eax, eax
mov dword [esp + 0x5c], 7
mov dword [esp + 0x58], ebx
mov word [esp + 0x48], ax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x30ac], 1
lea ecx, [esp + 0x44]
cmp eax, ebx
jne 0x406b96
push ecx
mov ecx, esi
call fcn.00405e40
jmp 0x406b9c
push eax
call fcn.00401760
cmp edi, 1
jne 0x406bc9
cmp dword [esp + 0x5c], 8
mov eax, dword [esp + 0x48]
jae 0x406bb0
lea eax, [esp + 0x48]
mov edx, dword [esp + 0x58]
push ebx
push ebx
push edx
push eax
mov eax, dword [esi + 0xd8]
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestW]
mov edi, eax
jmp 0x406c44
mov ecx, dword [esp + 0x24]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00402140
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x64]
push eax
mov byte [esp + 0x30b4], 2
call fcn.00405a90
add esp, 8
lea ecx, [esp + 0x28]
mov byte [esp + 0x30ac], 1
call fcn.00401f80
cmp dword [esp + 0x78], 0x10
mov ecx, dword [esp + 0x64]
jae 0x406c11
lea ecx, [esp + 0x64]
cmp dword [esp + 0x5c], 8
mov eax, dword [esp + 0x48]
jae 0x406c20
lea eax, [esp + 0x48]
mov edx, dword [esp + 0x74]
push edx
mov edx, dword [esi + 0xd8]
push ecx
mov ecx, dword [esp + 0x60]
push ecx
push eax
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
lea ecx, [esp + 0x60]
mov edi, eax
call fcn.004026c0
cmp edi, ebx
jne 0x406c75
push 0x4182d4
lea ecx, [esi + 4]
call fcn.00405400
mov esi, dword [esp + 0x14]
push 0x41846c
mov ecx, esi
call fcn.00402b60
lea ecx, [esp + 0x44]
call fcn.00401f80
mov eax, esi
jmp 0x406e34
push 0x2000
lea ecx, [esp + 0x10a2]
xor eax, eax
push ebx
push ecx
mov dword [esp + 0x28], 0x1000
mov word [esp + 0x10a8], ax
call fcn.004090b0
push 0x1000
lea edx, [esp + 0x10ac]
push ebx
push edx
call fcn.004090b0
mov edx, dword [esi + 0xd8]
add esp, 0x18
push ebx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x10a4]
push ecx
push 0x15
push edx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
cmp eax, ebx
jne 0x406cdb
push 0x4182bc
jmp 0x406c4d
lea eax, [esp + 0x109c]
push eax
lea ecx, [esp + 0x64]
call fcn.00402140
push ebx
push 0x418514
lea ecx, [esp + 0x68]
mov byte [esp + 0x30b4], 3
call fcn.00405370
cmp eax, 0xffffffff
je 0x406d3e
push 0x4184ec
lea ecx, [esi + 4]
call fcn.00405400
mov esi, dword [esp + 0x14]
push 0x41846c
mov ecx, esi
call fcn.00402b60
lea ecx, [esp + 0x60]
call fcn.00401f80
lea ecx, [esp + 0x44]
call fcn.00401f80
mov eax, esi
jmp 0x406e34
lea ecx, [esp + 0x60]
call fcn.00401f80
mov dword [esp + 0x94], 0xf
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
push 0x1000
lea ecx, [esp + 0x9d]
push ebx
push ecx
mov byte [esp + 0x30b8], 4
mov byte [esp + 0xa4], bl
call fcn.004090b0
mov ecx, dword [esi + 0xd8]
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
push 0x1000
lea eax, [esp + 0xa0]
push eax
push ecx
call edi
test eax, eax
je 0x406df2
lea ebx, [ebx]
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x406df2
lea edx, [esp + 0x98]
push edx
lea ecx, [esp + 0x80]
mov byte [esp + eax + 0x9c], bl
call fcn.00402330
mov edx, dword [esi + 0xd8]
lea eax, [esp + 0x1c]
push eax
push 0x1000
lea ecx, [esp + 0xa0]
push ecx
push edx
call edi
test eax, eax
jne 0x406db0
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x7c]
push eax
mov ecx, esi
call fcn.00402690
lea ecx, [esp + 0x7c]
call fcn.004026c0
lea ecx, [esp + 0x44]
call fcn.00401f80
mov eax, esi
jmp 0x406e34
push ebx
mov dword [ebp + 0x18], 0xf
mov dword [ebp + 0x14], ebx
push 0x41846c
mov ecx, ebp
mov byte [ebp + 4], bl
call fcn.00402a80
mov eax, ebp
mov ecx, dword [esp + 0x30a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x308c]
xor ecx, esp
call fcn.00406e5e
add esp, 0x309c
ret 0x14