Function at 0x406d10
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response

Disassembly:
push 0xffffffffffffffff
push 0x41b8cc
mov eax, dword fs:[0]
push eax
sub esp, 0xd00
mov eax, dword [0x4242c0]
xor eax, esp
mov dword [esp + 0xcfc], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4242c0]
xor eax, esp
push eax
lea eax, [esp + 0xd14]
mov dword fs:[0], eax
mov eax, dword [esp + 0xd24]
mov edi, ecx
xor ecx, ecx
xor ebp, ebp
push 0xffffffffffffffff
mov word [esp + 0x94], cx
mov ebx, 7
push ebp
lea ecx, [esp + 0x94]
mov dword [esp + 0x28], edi
mov dword [esp + 0xac], ebx
mov dword [esp + 0xa8], ebp
call fcn.00403800
mov dword [esp + 0xd1c], ebp
mov eax, dword [esp + 0x90]
mov esi, 8
cmp dword [esp + 0xa4], esi
jae 0x406da9
lea eax, [esp + 0x90]
push 0x42054c
push eax
call fcn.0040aa7f
add esp, 8
test eax, eax
jne 0x406dc4
push 3
mov eax, 0x42054c
jmp 0x406df8
mov eax, dword [esp + 0x90]
cmp dword [esp + 0xa4], esi
jae 0x406ddb
lea eax, [esp + 0x90]
push str.POST
push eax
call fcn.0040aa7f
add esp, 8
test eax, eax
jne 0x4073f7
push 4
mov eax, str.POST
lea esi, [esp + 0x90]
call fcn.004038b0
push ebp
push ebp
push ebp
push ebp
push str.WinHttpClient
mov byte [esp + 0x2f], 1
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
mov dword [esp + 0x28], ebx
cmp ebx, ebp
jne 0x406e61
mov dword [esp + 0xd1c], 0xffffffff
cmp dword [esp + 0xa4], 8
jb 0x406e47
mov edx, dword [esp + 0x90]
push edx
call fcn.0040a02e
add esp, 4
xor eax, eax
mov dword [esp + 0xa4], 7
mov word [esp + 0x90], ax
jmp 0x40742c
push 0x206
lea edx, [esp + 0xe6]
xor ecx, ecx
push ebp
push edx
mov word [esp + 0xec], cx
call fcn.0040b440
push 0xa26
lea ecx, [esp + 0x2fa]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x300], ax
call fcn.0040b440
push 0x3c
lea edx, [esp + 0x50]
push ebp
push edx
call fcn.0040b440
lea ecx, [esp + 0x30c]
add esp, 0x24
cmp dword [edi + 0x18], 8
lea eax, [esp + 0xe0]
mov dword [esp + 0x60], ecx
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x34], 0x3c
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], 0x104
mov dword [esp + 0x64], 0x514
mov dword [esp + 0x3c], ebp
jb 0x406eeb
mov eax, dword [edi + 4]
jmp 0x406eee
lea eax, [edi + 4]
lea edx, [esp + 0x34]
push edx
push ebp
push ecx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x4073b0
lea eax, [esp + 0xe0]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x406f10
sub eax, edx
sar eax, 1
push eax
lea esi, [edi + 0x70]
lea eax, [esp + 0xe4]
call fcn.004038b0
mov eax, dword [esp + 0x4c]
push ebp
push eax
lea ecx, [esp + 0xe8]
push ecx
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov esi, eax
mov dword [esp + 0x24], esi
cmp esi, ebp
je 0x4073b0
mov eax, dword [esp + 0x90]
xor ecx, ecx
cmp dword [esp + 0x40], 2
setne cl
dec ecx
and ecx, 0x800000
cmp dword [esp + 0xa4], 8
jae 0x406f7b
lea eax, [esp + 0x90]
mov edx, dword [esp + 0x60]
push ecx
push ebp
push ebp
push ebp
push edx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [esp + 0x1c], ebx
cmp ebx, ebp
je 0x4073a5
mov byte [esp + 0x1a], 0
xor eax, eax
jmp 0x406fa7
mov eax, dword [esp + 0x30]
mov ecx, eax
inc eax
cmp ecx, 3
mov dword [esp + 0x30], eax
jge 0x40738e
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x4072e9
push ebp
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4072e9
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
push ebp
lea edx, [esp + 0x18]
push edx
push ebp
push ebp
push 0x16
push ebx
mov dword [esp + 0x2c], ebp
call esi
cmp eax, ebp
jne 0x407006
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4072e9
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004095b4
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4072e7
mov eax, dword [esp + 0x14]
lea ecx, [eax + eax]
push ecx
push 0
push ebp
call fcn.0040b440
add esp, 0xc
push 0
lea edx, [esp + 0x18]
push edx
push ebp
push 0
push 0x16
push ebx
call esi
test eax, eax
je 0x4072e7
mov eax, dword [esp + 0x20]
add eax, 0x1c
push eax
mov eax, ebp
call fcn.00403490
mov ecx, dword [esp + 0x14]
push ecx
push ebp
call fcn.0040acf7
add esp, 8
mov eax, ebp
lea ecx, [esp + 0xa8]
call fcn.00402e50
mov byte [esp + 0xd1c], 1
lea edx, [esp + 0xa8]
push edx
mov edx, str.charset
call fcn.00407590
mov esi, eax
cmp esi, 0xffffffff
je 0x407150
mov eax, dword [esp + 0xbc]
add esi, 8
xor ebx, ebx
mov edi, esi
cmp esi, eax
jae 0x40710d
lea esp, [esp]
dec eax
cmp edi, eax
je 0x407109
lea eax, [esp + 0xa8]
call fcn.00407560
cmp word [eax], 0x20
je 0x407109
lea eax, [esp + 0xa8]
call fcn.00407560
cmp word [eax], 0x3b
je 0x407109
lea eax, [esp + 0xa8]
call fcn.00407560
cmp word [eax], 0xa
je 0x407109
mov eax, dword [esp + 0xbc]
inc edi
cmp edi, eax
jb 0x4070c0
jmp 0x40710d
sub edi, esi
mov ebx, edi
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0xac]
push ecx
mov ecx, ebx
mov edx, esi
call fcn.004075c0
mov byte [esp + 0xd1c], 2
mov ecx, dword [esp + 0x20]
push 0xffffffffffffffff
push 0
add ecx, 0x54
call fcn.00403800
mov byte [esp + 0xd1c], 1
lea esi, [esp + 0x70]
call fcn.00402e90
mov ebx, dword [esp + 0x1c]
push ebp
call fcn.0040a8dc
add esp, 4
mov eax, 0x41ff5c
lea ecx, [esp + 0xc4]
call fcn.00402e50
mov byte [esp + 0xd1c], 3
lea edx, [esp + 0x14]
push edx
xor esi, esi
push ebx
mov dword [esp + 0x1c], esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x407283
mov eax, dword [esp + 0x14]
push eax
call fcn.004095b4
mov ebp, eax
add esp, 4
cmp ebp, esi
je 0x407283
mov ecx, dword [esp + 0x14]
push ecx
push esi
push ebp
call fcn.0040b440
mov eax, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
push eax
push ebp
push ebx
mov dword [esp + 0x3c], esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40727a
mov ecx, dword [esp + 0x20]
add ecx, 0x54
push ecx
mov edx, str.utf_8
call fcn.00407590
push esi
push esi
cmp eax, 0xffffffff
je 0x4072f9
mov edx, dword [esp + 0x1c]
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push edx
push ebp
push 8
push 0xfde9
call ebx
mov edi, eax
test edi, edi
jle 0x407276
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004095b4
mov esi, eax
add esp, 4
test esi, esi
je 0x407276
lea eax, [edi + edi]
push eax
push 0
push esi
call fcn.0040b440
mov ecx, dword [esp + 0x20]
add esp, 0xc
push edi
push esi
push ecx
push ebp
push 8
push 0xfde9
call ebx
mov edi, eax
test edi, edi
jle 0x40726d
movzx ebx, word [esi + edi*2]
lea eax, [esp + 0xc4]
xor edx, edx
push eax
mov eax, esi
mov word [esi + edi*2], dx
call fcn.00402ec0
mov word [esi + edi*2], bx
push esi
call fcn.0040a8dc
add esp, 4
mov ebx, dword [esp + 0x1c]
push ebp
call fcn.0040a8dc
add esp, 4
cmp dword [esp + 0x14], 0
ja 0x407172
mov esi, str._result_:_success_
lea ecx, [esp + 0xc4]
call fcn.004047f0
test al, al
je 0x4072bf
mov ecx, dword [esp + 0x20]
push 0xffffffffffffffff
push 0
add ecx, 0x38
lea eax, [esp + 0xcc]
mov byte [esp + 0x22], 1
call fcn.00403800
mov byte [esp + 0xd1c], 1
lea esi, [esp + 0xc4]
call fcn.00402e90
mov byte [esp + 0xd1c], 0
lea esi, [esp + 0xa8]
call fcn.00402e90
xor ebp, ebp
cmp byte [esp + 0x1a], 0
je 0x406fa3
jmp 0x40739a
mov ecx, dword [esp + 0x1c]
push ecx
push ebp
push 1
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
jle 0x40727a
xor ecx, ecx
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004095b4
mov esi, eax
add esp, 4
test esi, esi
je 0x40727a
lea eax, [edi + edi]
push eax
push 0
push esi
call fcn.0040b440
mov ecx, dword [esp + 0x20]
add esp, 0xc
push edi
push esi
push ecx
push ebp
push 1
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edi, eax
test edi, edi
jle 0x407380
movzx ebx, word [esi + edi*2]
lea eax, [esp + 0xc4]
xor edx, edx
push eax
mov eax, esi
mov word [esi + edi*2], dx
call fcn.00402ec0
mov word [esi + edi*2], bx
mov ebx, dword [esp + 0x1c]
push esi
call fcn.0040a8dc
add esp, 4
jmp 0x40727a
cmp byte [esp + 0x1a], 0
jne 0x40739a
mov byte [esp + 0x1b], 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov esi, dword [esp + 0x24]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ebx, dword [esp + 0x28]
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [esp + 0xd1c], 0xffffffff
cmp dword [esp + 0xa4], 8
jb 0x4073dc
mov ecx, dword [esp + 0x90]
push ecx
call fcn.0040a02e
add esp, 4
mov al, byte [esp + 0x1b]
xor edx, edx
mov dword [esp + 0xa4], 7
mov word [esp + 0x90], dx
jmp 0x40742e
mov dword [esp + 0xd1c], 0xffffffff
cmp dword [esp + 0xa4], esi
jb 0x40741b
mov eax, dword [esp + 0x90]
push eax
call fcn.0040a02e
add esp, 4
xor ecx, ecx
mov dword [esp + 0xa4], ebx
mov word [esp + 0x90], cx
xor al, al
mov dword [esp + 0xa0], ebp
mov ecx, dword [esp + 0xd14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xcfc]
xor ecx, esp
call fcn.0040a01f
add esp, 0xd0c
ret 4