Function at 0x406240
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x443000
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x45a024]
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 edi, ecx
xor ebx, ebx
mov dword [ebp - 0x68], edi
mov dword [ebp - 0x70], ebx
mov dword [ebp - 4], 2
xor esi, esi
mov eax, 0x44f581
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.00404d00
push ebx
push ebx
push ebx
push ebx
push str.Download_1.0
mov byte [ebp - 4], 3
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
push 0x1388
push 0x1388
push 0x1388
mov esi, eax
push 0x1388
push esi
mov dword [ebp - 0x70], esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
cmp esi, ebx
je 0x4063e2
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x64]
push ecx
call fcn.00406000
add esp, 8
cmp dword [eax + 0x14], 8
jb 0x4062f1
mov eax, dword [eax]
push ebx
push 0x50
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
cmp dword [ebp - 0x50], 8
mov esi, eax
mov dword [ebp - 0x74], esi
jb 0x406313
mov edx, dword [ebp - 0x64]
push edx
call fcn.0041afda
add esp, 4
xor eax, eax
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], ebx
mov word [ebp - 0x64], ax
cmp esi, ebx
je 0x4063e2
lea ecx, [ebp + 0x24]
push ecx
lea edx, [ebp - 0x48]
push edx
call fcn.00406000
add esp, 8
cmp dword [eax + 0x14], 8
jb 0x406343
mov eax, dword [eax]
push ebx
push ebx
push ebx
push ebx
push eax
push str.POST
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
cmp dword [ebp - 0x34], 8
mov edi, eax
jb 0x406368
mov eax, dword [ebp - 0x48]
push eax
call fcn.0041afda
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x34], 7
mov dword [ebp - 0x38], ebx
mov word [ebp - 0x48], cx
cmp edi, ebx
je 0x4063df
push 0x20000000
push 0xffffffffffffffff
push str.Content_type:application_x_www_form_urlencoded_r_nAccept:__r_nConnection:close_r_n
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov esi, dword [ebp + 0x54]
mov edx, dword [ebp + 0x40]
cmp esi, 0x10
jae 0x40639d
lea edx, [ebp + 0x40]
xor eax, eax
mov ecx, 0x44f581
call fcn.004061c0
mov ecx, dword [ebp + 0x50]
cmp eax, ebx
jne 0x4063bf
xor eax, eax
cmp ecx, ebx
setne al
cmp eax, ebx
jne 0x4063bf
xor eax, eax
jmp 0x4063ca
mov eax, dword [ebp + 0x40]
cmp esi, 0x10
jae 0x4063ca
lea eax, [ebp + 0x40]
push ebx
push ecx
push ecx
push eax
push ebx
push ebx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
cmp eax, ebx
jne 0x406463
mov edi, dword [ebp - 0x68]
mov esi, dword [ebp - 0x68]
mov dword [edi + 0x14], 0xf
mov dword [edi + 0x10], ebx
mov byte [edi], bl
lea edi, [ebp - 0x2c]
call fcn.004048e0
mov esi, 0x10
cmp dword [ebp - 0x18], esi
jb 0x40640f
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0041afda
add esp, 4
mov edi, 0xf
mov byte [ebp - 0x2c], bl
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], edi
cmp dword [ebp + 0x1c], esi
jb 0x40642e
mov eax, dword [ebp + 8]
push eax
call fcn.0041afda
add esp, 4
mov byte [ebp + 8], bl
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x1c], edi
cmp dword [ebp + 0x38], esi
jb 0x406448
mov ecx, dword [ebp + 0x24]
push ecx
call fcn.0041afda
add esp, 4
mov dword [ebp + 0x38], edi
mov dword [ebp + 0x34], ebx
mov byte [ebp + 0x24], bl
cmp dword [ebp + 0x54], esi
jb 0x40657e
mov edx, dword [ebp + 0x40]
push edx
jmp 0x406576
push ebx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4064e7
nop
lea eax, [ebp - 0x6c]
push eax
push edi
mov dword [ebp - 0x6c], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x4065a5
mov ecx, dword [ebp - 0x6c]
inc ecx
push ecx
call fcn.0041b65b
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40659d
mov edx, dword [ebp - 0x6c]
inc edx
push edx
push ebx
push esi
call fcn.004212c0
mov ecx, dword [ebp - 0x6c]
add esp, 0xc
lea eax, [ebp - 0x78]
push eax
push ecx
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4064fc
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4064c5
sub eax, edx
push eax
mov eax, esi
lea ecx, [ebp - 0x2c]
call fcn.00404c20
push esi
call fcn.0041b666
add esp, 4
cmp dword [ebp - 0x6c], ebx
ja 0x406470
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push edi
call esi
mov ecx, dword [ebp - 0x74]
push ecx
call esi
mov edx, dword [ebp - 0x70]
push edx
call esi
mov eax, dword [ebp - 0x68]
mov dword [eax + 0x14], 0xf
mov dword [eax + 0x10], ebx
lea edi, [ebp - 0x2c]
mov esi, eax
mov byte [eax], bl
call fcn.004048e0
mov esi, 0x10
cmp dword [ebp - 0x18], esi
jb 0x40652b
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0041afda
add esp, 4
mov edi, 0xf
mov byte [ebp - 0x2c], bl
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], edi
cmp dword [ebp + 0x1c], esi
jb 0x40654a
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041afda
add esp, 4
mov byte [ebp + 8], bl
mov dword [ebp + 0x18], ebx
mov dword [ebp + 0x1c], edi
cmp dword [ebp + 0x38], esi
jb 0x406564
mov edx, dword [ebp + 0x24]
push edx
call fcn.0041afda
add esp, 4
mov byte [ebp + 0x24], bl
mov dword [ebp + 0x34], ebx
mov dword [ebp + 0x38], edi
cmp dword [ebp + 0x54], esi
jb 0x40657e
mov eax, dword [ebp + 0x40]
push eax
call fcn.0041afda
add esp, 4
mov eax, dword [ebp - 0x68]
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.0041af7a
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x6c], ebx
jmp 0x4064e7
mov eax, dword [ebp - 0x68]
mov dword [eax + 0x14], 0xf
mov dword [eax + 0x10], ebx
mov byte [eax], bl
mov esi, eax
jmp 0x4063f1