Function at 0x100059a0
Capabilities:
Prepare http request
Read http header
Receive http response

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1013ad92
mov eax, dword fs:[0]
push eax
sub esp, 0x960
mov eax, dword [0x1019b120]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x938], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x95c], ebx
mov dword [ebp - 0x920], eax
mov byte [ebx + 0x2c], 0
mov dword [ebp - 0x93c], 0
mov dword [ebp - 0x944], 0
call fcn.1000c3bc
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x10005a22
push 0x80004005
call fcn.100032c0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x930], eax
xor eax, eax
mov dword [ebp - 4], 0
xor esi, esi
mov dword [ebp - 0x940], eax
push 0x400
mov dword [ebp - 0x928], eax
mov dword [ebp - 0x948], eax
lea eax, [ebp - 0x814]
push esi
push eax
mov dword [ebp - 0x92c], 0
mov dword [ebp - 0x924], esi
call fcn.10123d80
add esp, 0xc
call fcn.1000c3bc
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x10005a90
push 0x80004005
call fcn.100032c0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x934], eax
mov byte [ebp - 4], 1
push dword [ebx + 0x38]
mov dword [ebx + 0x1c], 0x1f4
push 0
push dword [ebx + 0x34]
mov dword [ebp - 0x94c], 4
call fcn.10123d80
add esp, 0xc
mov dword [ebx + 0x38], 0
cmp dword [ebx + 4], 1
lea ecx, [ebp - 0x934]
jne 0x10005bf1
push 3
push 0x1017c74c
call fcn.10003310
test edi, edi
je 0x10005c7c
push 1
push 0x1017c754
lea ecx, [ebp - 0x930]
call fcn.10002930
push 3
push dword [ebp - 0x920]
lea eax, [ebp - 0x914]
lea ecx, [ebp - 0x918]
mov dword [ebp - 0x918], eax
call fcn.10002830
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x918]
mov dword [ebp - 0x920], esi
call fcn.1000c3bc
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x10005b4d
push 0x80004005
call fcn.100032c0
test esi, esi
jne 0x10005b5f
test edi, edi
je 0x10005b5f
push 0x80070057
call fcn.100032c0
mov eax, dword [edx]
mov ecx, edx
push 2
push edi
call dword [eax]
test eax, eax
jne 0x10005b71
call fcn.100031c0
lea esi, [eax + 0x10]
mov dword [ebp - 0x91c], esi
test edi, edi
js 0x10005b55
cmp edi, dword [esi - 8]
jg 0x10005b55
lea eax, [edi + edi]
mov dword [esi - 0xc], edi
push eax
push dword [ebp - 0x920]
xor ecx, ecx
push eax
push esi
mov word [eax + esi], cx
call fcn.10121fef
add esp, 0x10
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x914]
mov eax, dword [ebp - 0x918]
cmp eax, ecx
je 0x10005bbd
push eax
call fcn.101225e7
add esp, 4
push dword [esi - 0xc]
lea ecx, [ebp - 0x930]
push esi
call fcn.10002930
add esi, 0xfffffff0
mov byte [ebp - 4], 1
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10005bea
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
xor esi, esi
jmp 0x10005c7c
push 4
push 0x1017c758
call fcn.10003310
lea eax, [ebp - 0x928]
mov ecx, ebx
push eax
call fcn.10005840
lea edx, [ebp - 0x814]
mov ecx, dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x10005c13
mov edx, dword [ebp - 0x928]
or ecx, 0xffffffff
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10005c44
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x814]
mov esi, eax
mov dword [ebp - 0x940], eax
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10005c55
mov eax, dword [ebp - 0x920]
sub esi, ecx
sar esi, 1
mov dword [ebp - 0x924], esi
mov dword [ebp - 0x928], eax
mov dword [ebp - 0x948], edi
mov edx, dword [ebx + 0x28]
mov ecx, dword [edx - 0xc]
lea eax, [edx - 0xc]
mov dword [ebp - 0x920], eax
test ecx, ecx
je 0x10005d25
mov eax, 0x400
sub eax, esi
cmp ecx, eax
jae 0x10005d25
test esi, esi
je 0x10005ccd
lea ecx, [ebp - 0x814]
add ecx, 0xfffffffe
nop
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10005cb0
mov eax, dword [0x1017c764]
mov dword [ecx], eax
mov ax, word [0x1017c768]
mov word [ecx + 4], ax
mov esi, edx
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x10005cd0
lea edi, [ebp - 0x814]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10005ce6
mov ecx, edx
lea eax, [ebp - 0x814]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov dword [ebp - 0x940], eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x924]
cmp eax, esi
mov ecx, dword [ebp - 0x920]
sbb eax, eax
and eax, 2
add eax, dword [ecx]
add esi, eax
push dword [ebp - 0x938]
lea ecx, [ebp - 0x91c]
mov byte [ebp - 4], 5
call fcn.10002dd0
push 0x1017cc58
mov edi, 0x100
mov byte [ebp - 4], 6
push str.http:__
lea ecx, [ebp - 0x91c]
mov dword [ebp - 0x924], edi
call fcn.10006780
test eax, eax
jne 0x10005d87
push 0x1017cc58
push str.https:__
lea ecx, [ebp - 0x91c]
call fcn.10006780
test eax, eax
mov ecx, 0x800100
cmovg edi, ecx
mov dword [ebp - 0x924], edi
mov eax, dword [ebp - 0x91c]
add eax, 0xfffffff0
push eax
call fcn.10003050
add eax, 0x10
add esp, 4
mov dword [ebp - 0x920], eax
mov byte [ebp - 4], 7
mov eax, dword [ebp - 0x91c]
cmp dword [eax - 0xc], 0
jl 0x10005e46
push 0x1017cc8c
push eax
call fcn.101228e4
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x91c]
test edi, edi
je 0x10005e40
sub edi, eax
sar edi, 1
js 0x10005e40
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, edi
or ecx, edx
jge 0x10005df9
push edi
lea ecx, [ebp - 0x91c]
call fcn.10003210
mov eax, dword [ebp - 0x91c]
cmp edi, dword [eax - 8]
jg 0x10005b55
mov dword [eax - 0xc], edi
xor ecx, ecx
mov eax, dword [ebp - 0x91c]
push 0x1017cc58
mov word [eax + edi*2], cx
lea ecx, [ebp - 0x920]
push dword [ebp - 0x91c]
call fcn.10006780
push dword [ebp - 0x920]
lea ecx, [ebp - 0x930]
push 0
call fcn.100066a0
mov eax, dword [ebp - 0x91c]
mov edi, dword [ebp - 0x924]
push 0
push 0
push eax
push dword [ebx + 0x40]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x944], eax
test eax, eax
jne 0x10005e75
mov dword [ebp - 0x958], eax
lea eax, [ebp - 0x958]
push 0x10195ca0
push eax
call fcn.10123774
push edi
push 0
push 0
push 0
push dword [ebp - 0x930]
push dword [ebp - 0x934]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0x93c], edi
test edi, edi
jne 0x10005eb2
mov dword [ebp - 0x964], eax
lea eax, [ebp - 0x964]
push 0x10195ca0
push eax
call fcn.10123774
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x10005edc
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x10005edc
mov edx, dword [ebx + 0x10]
test edx, edx
je 0x10005edc
cmp dword [ebx + 0x14], 0
jbe 0x10005edc
push dword [ebx + 0x14]
push edx
push ecx
push eax
push dword [ebx + 0x40]
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
mov eax, dword [ebp - 0x948]
xor ecx, ecx
push 0
push eax
push eax
push dword [ebp - 0x928]
mov eax, dword [ebp - 0x940]
test esi, esi
push esi
cmove eax, ecx
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x10005f1d
mov dword [ebp - 0x96c], eax
lea eax, [ebp - 0x96c]
push 0x10195ca0
push eax
call fcn.10123774
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x10005f41
mov dword [ebp - 0x960], eax
lea eax, [ebp - 0x960]
push 0x10195ca0
push eax
call fcn.10123774
push 0
lea eax, [ebp - 0x94c]
push eax
lea eax, [ebx + 0x1c]
push eax
push 0
push 0x20000013
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x10005f77
mov dword [ebp - 0x968], eax
lea eax, [ebp - 0x968]
push 0x10195ca0
push eax
call fcn.10123774
mov byte [ebp - 0x928], 1
mov edi, edi
lea eax, [ebp - 0x92c]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x10005fa9
mov dword [ebp - 0x950], eax
lea eax, [ebp - 0x950]
push 0x10195ca0
push eax
call fcn.10123774
mov eax, dword [ebx + 0x38]
mov esi, dword [ebp - 0x92c]
add eax, esi
mov dword [ebp - 0x938], eax
cmp eax, dword [ebx + 0x3c]
jbe 0x10006026
mov ecx, dword [ebx + 0x34]
push eax
test ecx, ecx
jne 0x10005fd1
call fcn.101220d9
add esp, 4
jmp 0x10005fe0
push ecx
call fcn.1012216b
mov esi, dword [ebp - 0x92c]
add esp, 8
mov edi, eax
test edi, edi
jne 0x10005ffd
mov dword [ebp - 0x954], eax
lea eax, [ebp - 0x954]
push 0x10195ca0
push eax
call fcn.10123774
mov eax, dword [ebx + 0x38]
push esi
add eax, edi
push 0
push eax
call fcn.10123d80
mov eax, dword [ebp - 0x938]
add esp, 0xc
mov esi, dword [ebp - 0x92c]
mov dword [ebx + 0x34], edi
mov edi, dword [ebp - 0x93c]
mov dword [ebx + 0x3c], eax
lea eax, [ebp - 0x92c]
push eax
mov eax, dword [ebx + 0x34]
add eax, dword [ebx + 0x38]
push esi
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
neg eax
sbb al, al
xor edx, edx
and al, byte [ebp - 0x928]
movzx ecx, al
mov eax, dword [ebp - 0x92c]
test eax, eax
cmove ecx, edx
add dword [ebx + 0x38], eax
mov dword [ebp - 0x928], ecx
test cl, cl
jne 0x10005f80
lea ecx, [ebp - 0x920]
call fcn.10003030
lea ecx, [ebp - 0x91c]
call fcn.10003030
jmp 0x10006091
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2ee2
jne 0x100060a2
mov byte [ebx + 0x2c], 1
mov eax, dword [ebp - 0x944]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test eax, eax
je 0x100060b5
push eax
call esi
test edi, edi
je 0x100060bc
push edi
call esi
cmp dword [ebx + 0x1c], 0x12c
lea ecx, [ebp - 0x934]
setb bl
call fcn.10003030
lea ecx, [ebp - 0x930]
call fcn.10003030
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10121948
mov esp, ebp
pop ebp
ret 0xc