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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e8
mov eax, dword [0x100871e0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0xb8], 0
mov eax, 0x3a
mov word [ebp - 0x120], ax
push 0
push 0
call dword [sym.imp.USER32.dll_FindWindowW]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x168], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
mov dword [ebp - 0xe4], 0x1007c178
mov edx, dword [ebp - 0xe4]
add edx, 2
mov dword [ebp - 0x1c0], edx
mov eax, dword [ebp - 0xe4]
mov cx, word [eax]
mov word [ebp - 0x126], cx
add dword [ebp - 0xe4], 2
cmp word [ebp - 0x126], 0
jne 0x1000cec3
mov edx, dword [ebp - 0xe4]
sub edx, dword [ebp - 0x1c0]
sar edx, 1
mov dword [ebp - 0x1d8], edx
mov eax, dword [ebp - 0x1d8]
push eax
push 0x1007c188
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.100440f8
add esp, 0xc
test eax, eax
jne 0x1000d098
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0xd4], edx
mov eax, dword [ebp - 0xd4]
add eax, 2
mov dword [ebp - 0x1c4], eax
mov ecx, dword [ebp - 0xd4]
mov dx, word [ecx]
mov word [ebp - 0x13e], dx
add dword [ebp - 0xd4], 2
cmp word [ebp - 0x13e], 0
jne 0x1000cf30
mov eax, dword [ebp - 0xd4]
sub eax, dword [ebp - 0x1c4]
sar eax, 1
mov dword [ebp - 0x17c], eax
mov dword [ebp - 0xec], 0x1007c198
mov ecx, dword [ebp - 0xec]
add ecx, 2
mov dword [ebp - 0x184], ecx
mov edx, dword [ebp - 0xec]
mov ax, word [edx]
mov word [ebp - 0x12e], ax
add dword [ebp - 0xec], 2
cmp word [ebp - 0x12e], 0
jne 0x1000cf7e
mov ecx, dword [ebp - 0xec]
sub ecx, dword [ebp - 0x184]
sar ecx, 1
mov dword [ebp - 0x18c], ecx
mov edx, dword [ebp - 0x17c]
add edx, 1
sub edx, dword [ebp - 0x18c]
shl edx, 1
push edx
call fcn.100429a1
add esp, 4
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xf4], str.http:__
mov eax, dword [ebp - 0xf4]
add eax, 2
mov dword [ebp - 0x1bc], eax
mov ecx, dword [ebp - 0xf4]
mov dx, word [ecx]
mov word [ebp - 0x142], dx
add dword [ebp - 0xf4], 2
cmp word [ebp - 0x142], 0
jne 0x1000cfec
mov eax, dword [ebp - 0xf4]
sub eax, dword [ebp - 0x1bc]
sar eax, 1
mov dword [ebp - 0x194], eax
mov ecx, dword [ebp - 0x194]
mov edx, dword [ebp + 0x14]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x13c], eax
mov ecx, dword [ebp - 0xac]
mov dword [ebp - 0xf8], ecx
mov edx, dword [ebp - 0xf8]
mov dword [ebp - 0x1dc], edx
mov eax, dword [ebp - 0x13c]
mov cx, word [eax]
mov word [ebp - 0xda], cx
mov edx, dword [ebp - 0xf8]
mov ax, word [ebp - 0xda]
mov word [edx], ax
mov ecx, dword [ebp - 0x13c]
add ecx, 2
mov dword [ebp - 0x13c], ecx
mov edx, dword [ebp - 0xf8]
add edx, 2
mov dword [ebp - 0xf8], edx
cmp word [ebp - 0xda], 0
jne 0x1000d04b
jmp 0x1000d167
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp - 0xbc]
add ecx, 2
mov dword [ebp - 0x1c8], ecx
mov edx, dword [ebp - 0xbc]
mov ax, word [edx]
mov word [ebp - 0x14a], ax
add dword [ebp - 0xbc], 2
cmp word [ebp - 0x14a], 0
jne 0x1000d0b0
mov ecx, dword [ebp - 0xbc]
sub ecx, dword [ebp - 0x1c8]
sar ecx, 1
mov dword [ebp - 0x19c], ecx
mov edx, dword [ebp - 0x19c]
lea eax, [edx + edx + 2]
push eax
call fcn.100429a1
add esp, 4
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x148], ecx
mov edx, dword [ebp - 0xac]
mov dword [ebp - 0x114], edx
mov eax, dword [ebp - 0x114]
mov dword [ebp - 0x1e0], eax
mov ecx, dword [ebp - 0x148]
mov dx, word [ecx]
mov word [ebp - 0xc2], dx
mov eax, dword [ebp - 0x114]
mov cx, word [ebp - 0xc2]
mov word [eax], cx
mov edx, dword [ebp - 0x148]
add edx, 2
mov dword [ebp - 0x148], edx
mov eax, dword [ebp - 0x114]
add eax, 2
mov dword [ebp - 0x114], eax
cmp word [ebp - 0xc2], 0
jne 0x1000d11f
push 0x2f
mov ecx, dword [ebp - 0xac]
push ecx
call fcn.1004412e
add esp, 8
mov dword [ebp - 0x110], eax
mov dword [ebp - 0xd0], 0
cmp dword [ebp - 0x110], 0
je 0x1000d275
mov edx, dword [ebp - 0x110]
mov dword [ebp - 0xe0], edx
mov eax, dword [ebp - 0xe0]
add eax, 2
mov dword [ebp - 0x1d0], eax
mov ecx, dword [ebp - 0xe0]
mov dx, word [ecx]
mov word [ebp - 0x140], dx
add dword [ebp - 0xe0], 2
cmp word [ebp - 0x140], 0
jne 0x1000d1b0
mov eax, dword [ebp - 0xe0]
sub eax, dword [ebp - 0x1d0]
sar eax, 1
mov dword [ebp - 0x1a4], eax
mov ecx, dword [ebp - 0x1a4]
lea edx, [ecx + ecx + 2]
push edx
call fcn.100429a1
add esp, 4
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0x110]
mov dword [ebp - 0x118], eax
mov ecx, dword [ebp - 0xd0]
mov dword [ebp - 0x100], ecx
mov edx, dword [ebp - 0x100]
mov dword [ebp - 0x1e8], edx
mov eax, dword [ebp - 0x118]
mov cx, word [eax]
mov word [ebp - 0xdc], cx
mov edx, dword [ebp - 0x100]
mov ax, word [ebp - 0xdc]
mov word [edx], ax
mov ecx, dword [ebp - 0x118]
add ecx, 2
mov dword [ebp - 0x118], ecx
mov edx, dword [ebp - 0x100]
add edx, 2
mov dword [ebp - 0x100], edx
cmp word [ebp - 0xdc], 0
jne 0x1000d222
xor eax, eax
mov ecx, dword [ebp - 0x110]
mov word [ecx], ax
mov edx, 0x50
mov word [ebp - 0xcc], dx
movzx eax, word [ebp - 0x120]
push eax
mov ecx, dword [ebp - 0xac]
push ecx
call fcn.1004412e
add esp, 8
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 0
je 0x1000d2cf
xor edx, edx
mov eax, dword [ebp - 0x134]
mov word [eax], dx
push 0xa
push 0
mov ecx, dword [ebp - 0x134]
add ecx, 1
push ecx
call fcn.100444cf
add esp, 0xc
mov word [ebp - 0xcc], 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 0x1000d2fe
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 0x1000d324
mov dword [ebp - 0x160], 3
jmp 0x1000d32e
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 - 0x12c], eax
cmp dword [ebp - 0x12c], 0
je 0x1000d8a1
push 0
movzx eax, word [ebp - 0xcc]
push eax
mov ecx, dword [ebp - 0xac]
push ecx
mov edx, dword [ebp - 0x12c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
je 0x1000d881
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0xd0]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 0x124]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0xa8], eax
cmp dword [ebp - 0xa8], 0
je 0x1000d861
cmp dword [ebp + 0x28], 0
je 0x1000d4f8
mov dword [ebp - 0x11c], str.Content_Type:
lea eax, [ebp - 0xa4]
mov dword [ebp - 0x108], eax
mov ecx, dword [ebp - 0x108]
mov dword [ebp - 0x1e4], ecx
mov edx, dword [ebp - 0x11c]
mov ax, word [edx]
mov word [ebp - 0xe6], ax
mov ecx, dword [ebp - 0x108]
mov dx, word [ebp - 0xe6]
mov word [ecx], dx
mov eax, dword [ebp - 0x11c]
add eax, 2
mov dword [ebp - 0x11c], eax
mov ecx, dword [ebp - 0x108]
add ecx, 2
mov dword [ebp - 0x108], ecx
cmp word [ebp - 0xe6], 0
jne 0x1000d3f0
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0xf0], edx
mov eax, dword [ebp - 0xf0]
mov dword [ebp - 0x170], eax
mov ecx, dword [ebp - 0xf0]
mov dx, word [ecx]
mov word [ebp - 0x14c], dx
add dword [ebp - 0xf0], 2
cmp word [ebp - 0x14c], 0
jne 0x1000d44d
mov eax, dword [ebp - 0xf0]
sub eax, dword [ebp - 0x170]
mov ecx, dword [ebp - 0x170]
mov dword [ebp - 0x1d4], ecx
mov dword [ebp - 0x1ac], eax
lea edx, [ebp - 0xa4]
add edx, 0xfffffffe
mov dword [ebp - 0xfc], edx
mov eax, dword [ebp - 0xfc]
mov cx, word [eax + 2]
mov word [ebp - 0x136], cx
add dword [ebp - 0xfc], 2
cmp word [ebp - 0x136], 0
jne 0x1000d49b
mov edi, dword [ebp - 0xfc]
mov esi, dword [ebp - 0x1d4]
mov edx, dword [ebp - 0x1ac]
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 0x1000d5b5
mov edx, dword [ebp + 0x20]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [ebp - 0x1cc], ecx
mov edx, dword [ebp - 0x1cc]
mov dword [ebp - 0x104], edx
jmp 0x1000d52b
mov eax, dword [ebp - 0x104]
mov ecx, dword [eax]
mov dword [ebp - 0x104], ecx
mov edx, dword [ebp + 0x20]
mov eax, dword [edx]
mov dword [ebp - 0x1b4], eax
mov ecx, dword [ebp - 0x1b4]
mov dword [ebp - 0x180], ecx
mov edx, dword [ebp - 0x104]
cmp edx, dword [ebp - 0x180]
jne 0x1000d55c
mov dword [ebp - 0x178], 1
jmp 0x1000d566
mov dword [ebp - 0x178], 0
movzx eax, byte [ebp - 0x178]
test eax, eax
jne 0x1000d57d
mov dword [ebp - 0x174], 1
jmp 0x1000d587
mov dword [ebp - 0x174], 0
movzx ecx, byte [ebp - 0x174]
test ecx, ecx
je 0x1000d5b5
push 0x20000000
push 0xffffffffffffffff
mov edx, dword [ebp - 0x104]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0xa8]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
jmp 0x1000d51d
cmp dword [ebp + 0x28], 0
jne 0x1000d5c7
mov dword [ebp - 0x16c], 0
jmp 0x1000d61b
mov edx, dword [ebp + 0x28]
mov dword [ebp - 0xd8], edx
mov eax, dword [ebp - 0xd8]
add eax, 1
mov dword [ebp - 0x188], eax
mov ecx, dword [ebp - 0xd8]
mov dl, byte [ecx]
mov byte [ebp - 0xae], dl
add dword [ebp - 0xd8], 1
cmp byte [ebp - 0xae], 0
jne 0x1000d5df
mov eax, dword [ebp - 0xd8]
sub eax, dword [ebp - 0x188]
mov dword [ebp - 0x190], eax
mov ecx, dword [ebp - 0x190]
mov dword [ebp - 0x16c], ecx
cmp dword [ebp + 0x28], 0
jne 0x1000d62d
mov dword [ebp - 0x164], 0
jmp 0x1000d681
mov edx, dword [ebp + 0x28]
mov dword [ebp - 0xc0], edx
mov eax, dword [ebp - 0xc0]
add eax, 1
mov dword [ebp - 0x198], eax
mov ecx, dword [ebp - 0xc0]
mov dl, byte [ecx]
mov byte [ebp - 0xad], dl
add dword [ebp - 0xc0], 1
cmp byte [ebp - 0xad], 0
jne 0x1000d645
mov eax, dword [ebp - 0xc0]
sub eax, dword [ebp - 0x198]
mov dword [ebp - 0x1a0], eax
mov ecx, dword [ebp - 0x1a0]
mov dword [ebp - 0x164], ecx
push 0
mov edx, dword [ebp - 0x16c]
push edx
mov eax, dword [ebp - 0x164]
push eax
mov ecx, dword [ebp + 0x28]
push ecx
push 0
push 0
mov edx, dword [ebp - 0xa8]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x1a8], eax
cmp dword [ebp - 0x1a8], 0
je 0x1000d841
push 0
mov eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x1b0], eax
cmp dword [ebp - 0x1b0], 0
je 0x1000d841
cmp dword [ebp + 0xc], 0
je 0x1000d70c
mov dword [ebp - 0xb4], 4
push 0
lea ecx, [ebp - 0xb4]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 0
push 0x20000013
mov eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov dword [ebp - 0xb4], 0
lea ecx, [ebp - 0xb4]
push ecx
mov edx, dword [ebp - 0xa8]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x1000d733
jmp 0x1000d841
mov eax, dword [ebp - 0xb4]
push eax
call fcn.100429a1
add esp, 4
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0xc8], 0
je 0x1000d832
lea ecx, [ebp - 0x10c]
push ecx
mov edx, dword [ebp - 0xb4]
push edx
mov eax, dword [ebp - 0xc8]
push eax
mov ecx, dword [ebp - 0xa8]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x1000d79b
mov edx, dword [ebp - 0xc8]
mov dword [ebp - 0x1b8], edx
mov eax, dword [ebp - 0x1b8]
push eax
call fcn.10044523
add esp, 4
jmp 0x1000d841
cmp dword [ebp - 0xb8], 0
jne 0x1000d7c7
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
add edx, dword [ebp - 0x10c]
push edx
push 0
mov eax, dword [ebp - 0x168]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0xb8], eax
jmp 0x1000d7ef
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
add edx, dword [ebp - 0x10c]
push edx
mov eax, dword [ebp - 0xb8]
push eax
push 0
mov ecx, dword [ebp - 0x168]
push ecx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [ebp - 0xb8], eax
mov edx, dword [ebp - 0x10c]
push edx
mov eax, dword [ebp - 0xc8]
push eax
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0xb8]
add edx, dword [ecx]
push edx
call fcn.100469b0
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x10c]
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
mov eax, dword [ebp - 0xc8]
push eax
call fcn.10042a33
add esp, 4
jmp 0x1000d834
jmp 0x1000d841
cmp dword [ebp - 0xb4], 0
ja 0x1000d70c
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0
jne 0x1000d854
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp - 0xa8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0
jne 0x1000d874
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp - 0x124]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0
jne 0x1000d894
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp - 0x12c]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp + 8]
cmp dword [ecx], 0
jne 0x1000d8b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 8]
mov dword [edx], eax
cmp dword [ebp - 0xd0], 0
je 0x1000d8cc
mov eax, dword [ebp - 0xd0]
push eax
call fcn.10042a33
add esp, 4
mov ecx, dword [ebp - 0xac]
push ecx
call fcn.10042a33
add esp, 4
cmp dword [ebp - 0x158], 0
je 0x1000d8f1
mov edx, dword [ebp - 0x158]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x154], 0
je 0x1000d907
mov eax, dword [ebp - 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0x150], 0
je 0x1000d91d
mov ecx, dword [ebp - 0x150]
push ecx
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.100422b3
mov esp, ebp
pop ebp
ret