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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d8
mov eax, dword [0x1006e1e0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0xb8], 0
mov eax, 0x3a
mov word [ebp - 0x148], ax
push 0
push 0
call dword [sym.imp.USER32.dll_FindWindowW]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
mov dword [ebp - 0xd0], 0x10065020
mov edx, dword [ebp - 0xd0]
add edx, 2
mov dword [ebp - 0x17c], edx
mov eax, dword [ebp - 0xd0]
mov cx, word [eax]
mov word [ebp - 0x126], cx
add dword [ebp - 0xd0], 2
cmp word [ebp - 0x126], 0
jne 0x100063b3
mov edx, dword [ebp - 0xd0]
sub edx, dword [ebp - 0x17c]
sar edx, 1
mov dword [ebp - 0x1c4], edx
mov eax, dword [ebp - 0x1c4]
push eax
push 0x10065030
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.1002edc3
add esp, 0xc
test eax, eax
jne 0x10006588
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0xe8], edx
mov eax, dword [ebp - 0xe8]
add eax, 2
mov dword [ebp - 0x1b8], eax
mov ecx, dword [ebp - 0xe8]
mov dx, word [ecx]
mov word [ebp - 0x13a], dx
add dword [ebp - 0xe8], 2
cmp word [ebp - 0x13a], 0
jne 0x10006420
mov eax, dword [ebp - 0xe8]
sub eax, dword [ebp - 0x1b8]
sar eax, 1
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0xd8], 0x10065040
mov ecx, dword [ebp - 0xd8]
add ecx, 2
mov dword [ebp - 0x174], ecx
mov edx, dword [ebp - 0xd8]
mov ax, word [edx]
mov word [ebp - 0x12e], ax
add dword [ebp - 0xd8], 2
cmp word [ebp - 0x12e], 0
jne 0x1000646e
mov ecx, dword [ebp - 0xd8]
sub ecx, dword [ebp - 0x174]
sar ecx, 1
mov dword [ebp - 0x184], ecx
mov edx, dword [ebp - 0x1bc]
add edx, 1
sub edx, dword [ebp - 0x184]
shl edx, 1
push edx
call fcn.1002db91
add esp, 4
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xbc], str.http:__
mov eax, dword [ebp - 0xbc]
add eax, 2
mov dword [ebp - 0x1b0], eax
mov ecx, dword [ebp - 0xbc]
mov dx, word [ecx]
mov word [ebp - 0x13c], dx
add dword [ebp - 0xbc], 2
cmp word [ebp - 0x13c], 0
jne 0x100064dc
mov eax, dword [ebp - 0xbc]
sub eax, dword [ebp - 0x1b0]
sar eax, 1
mov dword [ebp - 0x18c], eax
mov ecx, dword [ebp - 0x18c]
mov edx, dword [ebp + 0x14]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x138], eax
mov ecx, dword [ebp - 0xac]
mov dword [ebp - 0xf8], ecx
mov edx, dword [ebp - 0xf8]
mov dword [ebp - 0x1c8], edx
mov eax, dword [ebp - 0x138]
mov cx, word [eax]
mov word [ebp - 0xea], cx
mov edx, dword [ebp - 0xf8]
mov ax, word [ebp - 0xea]
mov word [edx], ax
mov ecx, dword [ebp - 0x138]
add ecx, 2
mov dword [ebp - 0x138], ecx
mov edx, dword [ebp - 0xf8]
add edx, 2
mov dword [ebp - 0xf8], edx
cmp word [ebp - 0xea], 0
jne 0x1000653b
jmp 0x10006657
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xf4], eax
mov ecx, dword [ebp - 0xf4]
add ecx, 2
mov dword [ebp - 0x1c0], ecx
mov edx, dword [ebp - 0xf4]
mov ax, word [edx]
mov word [ebp - 0x140], ax
add dword [ebp - 0xf4], 2
cmp word [ebp - 0x140], 0
jne 0x100065a0
mov ecx, dword [ebp - 0xf4]
sub ecx, dword [ebp - 0x1c0]
sar ecx, 1
mov dword [ebp - 0x194], ecx
mov edx, dword [ebp - 0x194]
lea eax, [edx + edx + 2]
push eax
call fcn.1002db91
add esp, 4
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x114], ecx
mov edx, dword [ebp - 0xac]
mov dword [ebp - 0x110], edx
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x1d0], eax
mov ecx, dword [ebp - 0x114]
mov dx, word [ecx]
mov word [ebp - 0xda], dx
mov eax, dword [ebp - 0x110]
mov cx, word [ebp - 0xda]
mov word [eax], cx
mov edx, dword [ebp - 0x114]
add edx, 2
mov dword [ebp - 0x114], edx
mov eax, dword [ebp - 0x110]
add eax, 2
mov dword [ebp - 0x110], eax
cmp word [ebp - 0xda], 0
jne 0x1000660f
push 0x2f
mov ecx, dword [ebp - 0xac]
push ecx
call fcn.10007580
add esp, 8
mov dword [ebp - 0x104], eax
mov dword [ebp - 0xd4], 0
cmp dword [ebp - 0x104], 0
je 0x10006765
mov edx, dword [ebp - 0x104]
mov dword [ebp - 0xe4], edx
mov eax, dword [ebp - 0xe4]
add eax, 2
mov dword [ebp - 0x1a8], eax
mov ecx, dword [ebp - 0xe4]
mov dx, word [ecx]
mov word [ebp - 0x13e], dx
add dword [ebp - 0xe4], 2
cmp word [ebp - 0x13e], 0
jne 0x100066a0
mov eax, dword [ebp - 0xe4]
sub eax, dword [ebp - 0x1a8]
sar eax, 1
mov dword [ebp - 0x19c], eax
mov ecx, dword [ebp - 0x19c]
lea edx, [ecx + ecx + 2]
push edx
call fcn.1002db91
add esp, 4
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0x104]
mov dword [ebp - 0x14c], eax
mov ecx, dword [ebp - 0xd4]
mov dword [ebp - 0x10c], ecx
mov edx, dword [ebp - 0x10c]
mov dword [ebp - 0x1d8], edx
mov eax, dword [ebp - 0x14c]
mov cx, word [eax]
mov word [ebp - 0xc6], cx
mov edx, dword [ebp - 0x10c]
mov ax, word [ebp - 0xc6]
mov word [edx], ax
mov ecx, dword [ebp - 0x14c]
add ecx, 2
mov dword [ebp - 0x14c], ecx
mov edx, dword [ebp - 0x10c]
add edx, 2
mov dword [ebp - 0x10c], edx
cmp word [ebp - 0xc6], 0
jne 0x10006712
xor eax, eax
mov ecx, dword [ebp - 0x104]
mov word [ecx], ax
mov edx, 0x50
mov word [ebp - 0xe0], dx
movzx eax, word [ebp - 0x148]
push eax
mov ecx, dword [ebp - 0xac]
push ecx
call fcn.10007580
add esp, 8
mov dword [ebp - 0x118], eax
cmp dword [ebp - 0x118], 0
je 0x100067bf
xor edx, edx
mov eax, dword [ebp - 0x118]
mov word [eax], dx
push 0xa
push 0
mov ecx, dword [ebp - 0x118]
add ecx, 1
push ecx
call fcn.1002f19a
add esp, 0xc
mov word [ebp - 0xe0], ax
xor edx, edx
mov dword [ebp - 0x15c], edx
mov dword [ebp - 0x158], edx
mov dword [ebp - 0x154], edx
mov dword [ebp - 0x150], edx
movzx eax, byte [ebp + 0x18]
test eax, eax
jne 0x100067ee
lea ecx, [ebp - 0x15c]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
mov edx, dword [ebp + 8]
mov dword [edx], 0
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 0x154], 0
je 0x10006814
mov dword [ebp - 0x160], 3
jmp 0x1000681e
mov dword [ebp - 0x160], 0
push 0
mov eax, dword [ebp - 0x150]
push eax
mov ecx, dword [ebp - 0x154]
push ecx
mov edx, dword [ebp - 0x160]
push edx
push 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 0
je 0x10006d3c
push 0
movzx eax, word [ebp - 0xe0]
push eax
mov ecx, dword [ebp - 0xac]
push ecx
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x12c], eax
cmp dword [ebp - 0x12c], 0
je 0x10006d1c
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0xd4]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 0x12c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 0
je 0x10006cfc
cmp dword [ebp + 0x28], 0
je 0x100069e8
mov dword [ebp - 0x11c], str.Content_Type:
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xfc], eax
mov ecx, dword [ebp - 0xfc]
mov dword [ebp - 0x1d4], ecx
mov edx, dword [ebp - 0x11c]
mov ax, word [edx]
mov word [ebp - 0xec], ax
mov ecx, dword [ebp - 0xfc]
mov dx, word [ebp - 0xec]
mov word [ecx], dx
mov eax, dword [ebp - 0x11c]
add eax, 2
mov dword [ebp - 0x11c], eax
mov ecx, dword [ebp - 0xfc]
add ecx, 2
mov dword [ebp - 0xfc], ecx
cmp word [ebp - 0xec], 0
jne 0x100068e0
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0xf0]
mov dword [ebp - 0x168], eax
mov ecx, dword [ebp - 0xf0]
mov dx, word [ecx]
mov word [ebp - 0x11e], dx
add dword [ebp - 0xf0], 2
cmp word [ebp - 0x11e], 0
jne 0x1000693d
mov eax, dword [ebp - 0xf0]
sub eax, dword [ebp - 0x168]
mov ecx, dword [ebp - 0x168]
mov dword [ebp - 0x1ac], ecx
mov dword [ebp - 0x1a4], eax
lea edx, [ebp - 0xa4]
add edx, 0xfffffffe
mov dword [ebp - 0x100], edx
mov eax, dword [ebp - 0x100]
mov cx, word [eax + 2]
mov word [ebp - 0x142], cx
add dword [ebp - 0x100], 2
cmp word [ebp - 0x142], 0
jne 0x1000698b
mov edi, dword [ebp - 0x100]
mov esi, dword [ebp - 0x1ac]
mov edx, dword [ebp - 0x1a4]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x20000000
push 0xffffffffffffffff
lea eax, [ebp - 0xa4]
push eax
mov ecx, dword [ebp - 0xa8]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
cmp dword [ebp + 0x20], 0
je 0x10006a50
lea edx, [ebp - 0x124]
push edx
mov ecx, dword [ebp + 0x20]
call fcn.10007200
jmp 0x10006a0a
lea ecx, [ebp - 0x124]
call fcn.10007280
lea eax, [ebp - 0x1cc]
push eax
mov ecx, dword [ebp + 0x20]
call fcn.10007230
push eax
lea ecx, [ebp - 0x124]
call fcn.100072a0
movzx ecx, al
test ecx, ecx
je 0x10006a50
push 0x20000000
push 0xffffffffffffffff
lea ecx, [ebp - 0x124]
call fcn.10007260
mov edx, dword [eax]
push edx
mov eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
jmp 0x100069ff
cmp dword [ebp + 0x28], 0
jne 0x10006a62
mov dword [ebp - 0x170], 0
jmp 0x10006ab6
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0xc0], ecx
mov edx, dword [ebp - 0xc0]
add edx, 1
mov dword [ebp - 0x1b4], edx
mov eax, dword [ebp - 0xc0]
mov cl, byte [eax]
mov byte [ebp - 0xae], cl
add dword [ebp - 0xc0], 1
cmp byte [ebp - 0xae], 0
jne 0x10006a7a
mov edx, dword [ebp - 0xc0]
sub edx, dword [ebp - 0x1b4]
mov dword [ebp - 0x178], edx
mov eax, dword [ebp - 0x178]
mov dword [ebp - 0x170], eax
cmp dword [ebp + 0x28], 0
jne 0x10006ac8
mov dword [ebp - 0x16c], 0
jmp 0x10006b1c
mov ecx, dword [ebp + 0x28]
mov dword [ebp - 0xc4], ecx
mov edx, dword [ebp - 0xc4]
add edx, 1
mov dword [ebp - 0x180], edx
mov eax, dword [ebp - 0xc4]
mov cl, byte [eax]
mov byte [ebp - 0xad], cl
add dword [ebp - 0xc4], 1
cmp byte [ebp - 0xad], 0
jne 0x10006ae0
mov edx, dword [ebp - 0xc4]
sub edx, dword [ebp - 0x180]
mov dword [ebp - 0x188], edx
mov eax, dword [ebp - 0x188]
mov dword [ebp - 0x16c], eax
push 0
mov ecx, dword [ebp - 0x170]
push ecx
mov edx, dword [ebp - 0x16c]
push edx
mov eax, dword [ebp + 0x28]
push eax
push 0
push 0
mov ecx, dword [ebp - 0xa8]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x190], eax
cmp dword [ebp - 0x190], 0
je 0x10006cdc
push 0
mov edx, dword [ebp - 0xa8]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x198], eax
cmp dword [ebp - 0x198], 0
je 0x10006cdc
cmp dword [ebp + 0xc], 0
je 0x10006ba7
mov dword [ebp - 0xb4], 4
push 0
lea eax, [ebp - 0xb4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0
push 0x20000013
mov edx, dword [ebp - 0xa8]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov dword [ebp - 0xb4], 0
lea eax, [ebp - 0xb4]
push eax
mov ecx, dword [ebp - 0xa8]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x10006bce
jmp 0x10006cdc
mov edx, dword [ebp - 0xb4]
push edx
call fcn.1002db91
add esp, 4
mov dword [ebp - 0xcc], eax
cmp dword [ebp - 0xcc], 0
je 0x10006ccd
lea eax, [ebp - 0x108]
push eax
mov ecx, dword [ebp - 0xb4]
push ecx
mov edx, dword [ebp - 0xcc]
push edx
mov eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x10006c36
mov ecx, dword [ebp - 0xcc]
mov dword [ebp - 0x1a0], ecx
mov edx, dword [ebp - 0x1a0]
push edx
call fcn.1002f1ee
add esp, 4
jmp 0x10006cdc
cmp dword [ebp - 0xb8], 0
jne 0x10006c62
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x108]
push ecx
push 0
mov edx, dword [ebp - 0x164]
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xb8], eax
jmp 0x10006c8a
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x108]
push ecx
mov edx, dword [ebp - 0xb8]
push edx
push 0
mov eax, dword [ebp - 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [ebp - 0xb8], eax
mov ecx, dword [ebp - 0x108]
push ecx
mov edx, dword [ebp - 0xcc]
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0xb8]
add ecx, dword [eax]
push ecx
call fcn.10031570
add esp, 0xc
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
add eax, dword [ebp - 0x108]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov edx, dword [ebp - 0xcc]
push edx
call fcn.1002dc23
add esp, 4
jmp 0x10006ccf
jmp 0x10006cdc
cmp dword [ebp - 0xb4], 0
ja 0x10006ba7
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x10006cef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 0xa8]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x10006d0f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 0x12c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x10006d2f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 0x134]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x10006d4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
cmp dword [ebp - 0xd4], 0
je 0x10006d67
mov edx, dword [ebp - 0xd4]
push edx
call fcn.1002dc23
add esp, 4
mov eax, dword [ebp - 0xac]
push eax
call fcn.1002dc23
add esp, 4
cmp dword [ebp - 0x158], 0
je 0x10006d8c
mov ecx, dword [ebp - 0x158]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x154], 0
je 0x10006da2
mov edx, dword [ebp - 0x154]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x150], 0
je 0x10006db8
mov eax, dword [ebp - 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0xb8]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1002d4ad
mov esp, ebp
pop ebp
ret