Function at 0x40cd90
Capabilities:
Initialize winhttp library
Make an http request with a cookie
Prepare http request
Read http header
Receive http response
Send data
Send http request
Set http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4297f2
mov eax, dword fs:[0]
push eax
mov eax, 0x1134
call fcn.004141d0
mov eax, dword [0x434c18]
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 eax, dword [ebp + 8]
mov esi, ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x1100], eax
mov eax, dword [esi + 0x18]
xor ebx, ebx
cmp eax, ebx
ja 0x40cde8
mov dword [esi + 0x11c], 3
jmp 0x40db46
push 0xffffffffffffffff
push ebx
xor edx, edx
push ecx
lea ecx, [ebp - 0x1088]
mov dword [ebp - 0x1074], 7
mov dword [ebp - 0x1078], ebx
mov word [ebp - 0x1088], dx
call fcn.00408bc0
mov eax, dword [ebp - 0x1088]
mov edi, 8
mov dword [ebp - 4], ebx
cmp dword [ebp - 0x1074], edi
jae 0x40ce2c
lea eax, [ebp - 0x1088]
push 0x42c724
push eax
call fcn.004142fe
add esp, 8
test eax, eax
jne 0x40ce47
push 3
push 0x42c724
jmp 0x40ce78
mov eax, dword [ebp - 0x1088]
cmp dword [ebp - 0x1074], edi
jae 0x40ce5b
lea eax, [ebp - 0x1088]
push str.POST
push eax
call fcn.004142fe
add esp, 8
test eax, eax
jne 0x40db25
push 4
push str.POST
lea ecx, [ebp - 0x1088]
call fcn.00408cc0
mov byte [ebp - 0x10c9], 1
cmp dword [esi], ebx
jne 0x40ced3
cmp dword [esi + 0x150], edi
lea eax, [esi + 0x13c]
jb 0x40ce9e
mov eax, dword [eax]
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi], eax
cmp eax, ebx
jne 0x40ced3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
cmp dword [ebp - 0x1074], edi
jb 0x40db46
mov eax, dword [ebp - 0x1088]
push eax
jmp 0x40db3e
mov ecx, dword [esi + 0x1bc]
mov edx, dword [esi + 0x1b8]
mov eax, dword [esi + 0x1b4]
push ecx
mov ecx, dword [esi + 0x1b0]
push edx
mov edx, dword [esi]
push eax
push ecx
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
push 0x206
lea ecx, [ebp - 0x41e]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x420], ax
call fcn.00412330
push 0xa26
lea eax, [ebp - 0x104e]
xor edx, edx
push ebx
push eax
mov word [ebp - 0x1050], dx
call fcn.00412330
push 0x3c
lea ecx, [ebp - 0x1140]
push ebx
push ecx
call fcn.00412330
lea eax, [ebp - 0x1050]
lea ecx, [esi + 8]
add esp, 0x24
lea edx, [ebp - 0x420]
mov dword [ebp - 0x1114], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x1140], 0x3c
mov dword [ebp - 0x1130], edx
mov dword [ebp - 0x112c], 0x104
mov dword [ebp - 0x1110], 0x514
mov dword [ebp - 0x1138], 1
cmp dword [ecx + 0x14], edi
jb 0x40cf8d
mov ecx, dword [ecx]
lea edx, [ebp - 0x1140]
push edx
push ebx
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x40db06
lea eax, [ebp - 0x420]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40cfb0
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x420]
push eax
lea ecx, [esi + 0x24]
call fcn.00408cc0
mov ecx, dword [ebp - 0x1128]
mov eax, dword [esi]
push ebx
push ecx
lea edx, [ebp - 0x420]
push edx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
mov dword [ebp - 0x10fc], edi
cmp edi, ebx
je 0x40db01
mov eax, dword [ebp - 0x1088]
xor ecx, ecx
cmp dword [ebp - 0x1134], 2
setne cl
dec ecx
and ecx, 0x800000
cmp dword [ebp - 0x1074], 8
jae 0x40d01f
lea eax, [ebp - 0x1088]
push ecx
mov ecx, dword [ebp - 0x1114]
push 0
push 0
push 0
push ecx
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [ebp - 0x10d0], ebx
test ebx, ebx
je 0x40dafa
cmp byte [esi + 4], 0
jne 0x40d070
cmp dword [ebp - 0x1134], 2
jne 0x40d070
push 4
lea edx, [ebp - 0x10c8]
push edx
push 0x1f
push ebx
mov dword [ebp - 0x10c8], 0x3100
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
mov dword [ebp - 0x10c8], 0
lea ebx, [ebx]
mov edi, 8
mov eax, dword [ebp - 0x10c8]
mov ecx, eax
inc eax
mov dword [ebp - 0x10c8], eax
cmp ecx, 3
jae 0x40dae0
mov ecx, dword [esi + 0xf4]
test ecx, ecx
je 0x40d0d5
cmp dword [esi + 0xf8], edi
lea eax, [esi + 0xe4]
jb 0x40d0b7
mov eax, dword [eax]
push 0x1000000
push ecx
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x40d0d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
cmp dword [esi + 0xd0], 0
jbe 0x40d14f
push str.Cookie:
lea ecx, [ebp - 0x10c0]
call fcn.0040aae0
push 0xffffffffffffffff
push 0
lea edx, [esi + 0xc0]
push edx
lea ecx, [ebp - 0x10c0]
mov byte [ebp - 4], 1
call fcn.004093d0
mov eax, dword [ebp - 0x10c0]
cmp dword [ebp - 0x10ac], edi
jae 0x40d11c
lea eax, [ebp - 0x10c0]
mov ecx, dword [ebp - 0x10b0]
push 0x1000000
push ecx
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x40d140
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
lea ecx, [ebp - 0x10c0]
mov byte [ebp - 4], 0
call fcn.00406d50
cmp dword [esi + 0x110], 0
jbe 0x40d25d
xor eax, eax
xor edx, edx
mov dword [ebp - 0x10dc], eax
push 0x206
mov dword [ebp - 0x10d8], eax
mov dword [ebp - 0x10d4], eax
push edx
lea eax, [ebp - 0x216]
push eax
mov dword [ebp - 0x10dc], 3
mov word [ebp - 0x218], dx
call fcn.00412330
lea eax, [esi + 0x100]
add esp, 0xc
cmp dword [eax + 0x14], edi
jb 0x40d1a5
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x218]
push 0x104
push ecx
call fcn.00414389
add esp, 0xc
push 0xc
lea eax, [ebp - 0x10dc]
push eax
push 0x26
lea edx, [ebp - 0x218]
push ebx
mov dword [ebp - 0x10d8], edx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x40d1e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
mov ecx, dword [esi + 0x16c]
test ecx, ecx
je 0x40d25d
cmp dword [esi + 0x170], edi
lea eax, [esi + 0x15c]
jb 0x40d202
mov eax, dword [eax]
add ecx, ecx
push ecx
push eax
push 0x1002
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x40d222
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
mov ecx, dword [esi + 0x188]
test ecx, ecx
je 0x40d25d
cmp dword [esi + 0x18c], edi
lea eax, [esi + 0x178]
jb 0x40d23c
mov eax, dword [eax]
lea edx, [ecx + ecx]
push edx
push eax
push 0x1003
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x40d25d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
cmp byte [ebp + 0x10], 0
je 0x40d28f
push 4
lea eax, [ebp - 0x10c4]
push eax
push 0x3f
push ebx
mov dword [ebp - 0x10c4], 2
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x40d28f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
mov byte [ebp - 0x10ca], 0
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x40d4ef
lea ecx, [ebp - 0x1098]
push ecx
mov dword [ebp - 0x1098], eax
mov dword [ebp - 0x1094], eax
mov dword [ebp - 0x1090], eax
mov dword [ebp - 0x108c], eax
call dword [sym.imp.WINHTTP.dll_WinHttpGetIEProxyConfigForCurrentUser]
test eax, eax
je 0x40d536
mov ecx, dword [ebp - 0x1094]
xor eax, eax
cmp ecx, eax
je 0x40d3da
mov dword [ebp - 0x105c], eax
mov dword [ebp - 0x1058], eax
mov dword [ebp - 0x1068], eax
mov dword [ebp - 0x1064], eax
mov dword [ebp - 0x1060], eax
mov dword [ebp - 0x1054], eax
mov dword [ebp - 0x1058], eax
mov dword [ebp - 0x105c], eax
mov dword [ebp - 0x10f8], eax
mov dword [ebp - 0x10f4], eax
mov dword [ebp - 0x10f0], eax
mov edx, 1
lea eax, [esi + 8]
mov dword [ebp - 0x1068], 3
mov dword [ebp - 0x1064], edx
mov dword [ebp - 0x1060], ecx
mov dword [ebp - 0x1054], edx
cmp dword [eax + 0x14], edi
jb 0x40d35b
mov eax, dword [eax]
lea edx, [ebp - 0x10f8]
push edx
mov edx, dword [esi]
lea ecx, [ebp - 0x1068]
push ecx
push eax
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpGetProxyForUrl]
test eax, eax
je 0x40d49e
push 0xc
lea eax, [ebp - 0x10f8]
push eax
push 0x26
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x40d3af
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x40d3af
mov byte [ebp - 0x10ca], 1
mov eax, dword [ebp - 0x10f4]
test eax, eax
je 0x40d3c0
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x10f0]
test eax, eax
je 0x40d4aa
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x40d4aa
mov edi, dword [ebp - 0x1090]
test edi, edi
je 0x40d4cc
xor ecx, ecx
xor eax, eax
push 0x206
push ecx
lea edx, [ebp - 0x216]
mov dword [ebp - 0x10ec], eax
push edx
mov dword [ebp - 0x10e8], eax
mov dword [ebp - 0x10e4], eax
mov dword [ebp - 0x10ec], 3
mov word [ebp - 0x218], cx
call fcn.00412330
push edi
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00414389
mov edi, dword [ebp - 0x108c]
add esp, 0x18
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x10e8], ecx
test edi, edi
je 0x40d488
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x626]
push eax
mov word [ebp - 0x628], dx
call fcn.00412330
push edi
lea ecx, [ebp - 0x628]
push 0x104
push ecx
call fcn.00414389
lea edx, [ebp - 0x628]
add esp, 0x18
mov dword [ebp - 0x10e4], edx
push 0xc
lea eax, [ebp - 0x10ec]
push eax
push 0x26
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x40d4aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
mov eax, dword [ebp - 0x1094]
test eax, eax
je 0x40d4bb
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x1090]
test eax, eax
je 0x40d4cc
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x108c]
test eax, eax
je 0x40d4dd
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp byte [ebp - 0x10ca], 0
je 0x40d080
mov edi, 8
mov eax, dword [esi + 0xdc]
test eax, eax
je 0x40d529
mov edx, dword [esi + 0xe0]
lea ecx, [ebp - 0x10c4]
push ecx
push edx
push eax
push ebx
mov dword [ebp - 0x10c4], 0
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
jne 0x40d529
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40d547
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
jmp 0x40d085
mov ecx, dword [ebp - 0x10d0]
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
push 0
lea eax, [ebp - 0x10c4]
push eax
push 0
push 0
push 0x16
push ecx
mov dword [ebp - 0x10c4], 0
call ebx
test eax, eax
jne 0x40d582
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40d969
mov eax, dword [ebp - 0x10c4]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00411721
mov edi, eax
add esp, 4
mov dword [ebp - 0x1104], edi
test edi, edi
je 0x40d969
mov eax, dword [ebp - 0x10c4]
lea ecx, [eax + eax]
push ecx
push 0
push edi
call fcn.00412330
mov eax, dword [ebp - 0x10d0]
add esp, 0xc
push 0
lea edx, [ebp - 0x10c4]
push edx
push edi
push 0
push 0x16
push eax
call ebx
test eax, eax
je 0x40d960
lea ebx, [esi + 0x40]
push edi
mov ecx, ebx
call fcn.0040ab30
xor eax, eax
mov dword [ebp - 0x10e0], eax
mov dword [ebp - 0x10dc], eax
mov dword [ebp - 0x10d8], eax
push 0x42c588
lea ecx, [ebp - 0x106c]
mov byte [ebp - 4], 2
call fcn.0040aae0
cmp byte [esi + 0x158], 0
mov byte [ebp - 4], 3
jne 0x40d686
push str.charset_A_Za_z0_9___
lea ecx, [ebp - 0x106c]
call fcn.0040ab30
push 0
lea ecx, [ebp - 0x10e0]
push ecx
push ebx
push 1
lea edx, [ebp - 0x106c]
push 0
push edx
call fcn.0040c9a0
add esp, 0x18
test al, al
je 0x40d686
mov ecx, dword [ebp - 0x10dc]
mov edi, dword [ebp - 0x10e0]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40d686
push 0xffffffffffffffff
push 0
push edi
lea ecx, [esi + 0x78]
call fcn.00408bc0
push str.Content_Length:__0_9_
lea ecx, [ebp - 0x106c]
call fcn.0040ab30
push 0
lea ecx, [ebp - 0x10e0]
push ecx
push ebx
push 1
lea edx, [ebp - 0x106c]
push 0
push edx
call fcn.0040c9a0
add esp, 0x18
test al, al
je 0x40d6f1
mov ecx, dword [ebp - 0x10dc]
mov edi, dword [ebp - 0x10e0]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40d6f1
cmp dword [edi + 0x14], 8
jb 0x40d6e2
mov edi, dword [edi]
push edi
call fcn.00414402
add esp, 4
mov dword [esi + 0xa0], eax
push str.Location:__0_9_
lea ecx, [ebp - 0x106c]
call fcn.0040ab30
push 0
lea ecx, [ebp - 0x10e0]
push ecx
push ebx
push 1
lea edx, [ebp - 0x106c]
push 0
push edx
call fcn.0040c9a0
add esp, 0x18
test al, al
je 0x40d755
mov ecx, dword [ebp - 0x10dc]
mov edi, dword [ebp - 0x10e0]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40d755
push 0xffffffffffffffff
push 0
push edi
lea ecx, [esi + 0x194]
call fcn.00408bc0
push str.Content_Type:__A_Za_z0_9___.__n
lea ecx, [ebp - 0x106c]
call fcn.0040ab30
push 0
lea ecx, [ebp - 0x10e0]
push ecx
push ebx
push 1
lea edx, [ebp - 0x106c]
push 1
push edx
call fcn.0040c9a0
add esp, 0x18
test al, al
je 0x40d7b9
mov ecx, dword [ebp - 0x10dc]
mov edi, dword [ebp - 0x10e0]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40d7b9
push 0xffffffffffffffff
push 0
push edi
lea ecx, [esi + 0x1c0]
call fcn.00408bc0
push str.Accept_Ranges:__A_Za_z__n
lea ecx, [ebp - 0x106c]
call fcn.0040ab30
push 0
lea ecx, [ebp - 0x10e0]
push ecx
push ebx
push 1
lea edx, [ebp - 0x106c]
push 1
push edx
call fcn.0040c9a0
add esp, 0x18
test al, al
je 0x40d81d
mov ecx, dword [ebp - 0x10dc]
mov edi, dword [ebp - 0x10e0]
sub ecx, edi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40d81d
push 0xffffffffffffffff
push 0
push edi
lea ecx, [esi + 0x1dc]
call fcn.00408bc0
push str.Set_Cookie:_b.__n
lea ecx, [ebp - 0x106c]
call fcn.0040ab30
push 0
lea ecx, [ebp - 0x10e0]
push ecx
push ebx
push 1
lea edx, [ebp - 0x106c]
push 0
push edx
call fcn.0040c9a0
add esp, 0x18
test al, al
je 0x40d93a
mov edi, dword [ebp - 0x10dc]
mov ecx, dword [ebp - 0x10e0]
sub edi, ecx
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov edi, edx
shr edi, 0x1f
add edi, edx
je 0x40d93a
xor ebx, ebx
test edi, edi
je 0x40d8be
mov dword [ebp - 0x10c8], ecx
mov eax, dword [ebp - 0x10c8]
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esi + 0xa4]
call fcn.004093d0
lea eax, [edi - 1]
cmp ebx, eax
je 0x40d8b2
push 0x42c5b4
lea ecx, [esi + 0xa4]
call fcn.0040ab60
add dword [ebp - 0x10c8], 0x1c
inc ebx
cmp ebx, edi
jb 0x40d885
push 0x42c5b0
lea ecx, [ebp - 0x10c0]
call fcn.0040aae0
lea ecx, [ebp - 0x10c0]
push ecx
lea edi, [esi + 0xa4]
lea edx, [ebp - 0x10a4]
push edi
push edx
mov byte [ebp - 4], 4
call fcn.0040bfe0
add esp, 0xc
push eax
mov ecx, edi
mov byte [ebp - 4], 5
call fcn.0040af50
lea ecx, [ebp - 0x10a4]
call fcn.00406d50
lea ecx, [ebp - 0x10c0]
mov byte [ebp - 4], 3
call fcn.00406d50
mov eax, dword [esi + 0xb4]
test eax, eax
je 0x40d93a
dec eax
push eax
mov ecx, edi
call fcn.00406100
cmp word [eax], 0x3b
je 0x40d93a
push 0x42c5ac
mov ecx, edi
call fcn.0040ab60
lea ecx, [ebp - 0x106c]
call fcn.00406d50
lea ecx, [ebp - 0x10e0]
mov byte [ebp - 4], 0
call fcn.0040c6c0
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov edi, dword [ebp - 0x1104]
push edi
call fcn.0041313e
add esp, 4
mov ecx, dword [ebp - 0x10d0]
push 0
lea eax, [ebp - 0x10c4]
push eax
push 0
push 0
push 0x13
push ecx
mov dword [ebp - 0x10c4], 0
call ebx
test eax, eax
jne 0x40d99a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40da04
mov eax, dword [ebp - 0x10c4]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00411721
mov edi, eax
add esp, 4
test edi, edi
je 0x40da04
mov eax, dword [ebp - 0x10c4]
lea ecx, [eax + eax]
push ecx
push 0
push edi
call fcn.00412330
mov eax, dword [ebp - 0x10d0]
add esp, 0xc
push 0
lea edx, [ebp - 0x10c4]
push edx
push edi
push 0
push 0x13
push eax
call ebx
test eax, eax
je 0x40d9fb
push edi
lea ecx, [esi + 0x120]
call fcn.0040ab30
push edi
call fcn.0041313e
add esp, 4
xor ebx, ebx
jmp 0x40da10
mov edx, dword [ebp - 0x10d0]
lea ecx, [ebp - 0x10c4]
push ecx
push edx
mov dword [ebp - 0x10c4], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40dab7
push ebx
mov ecx, esi
call fcn.00401340
mov eax, dword [ebp - 0x10c4]
inc eax
push eax
call fcn.00411721
mov edi, eax
add esp, 4
test edi, edi
je 0x40dac3
mov ecx, dword [ebp - 0x10c4]
inc ecx
push ecx
push 0
push edi
call fcn.00412330
mov eax, dword [ebp - 0x10c4]
mov ecx, dword [ebp - 0x10d0]
add esp, 0xc
lea edx, [ebp - 0x10c8]
push edx
push eax
push edi
push ecx
mov dword [ebp - 0x10c8], 0
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40daac
mov edx, dword [ebp - 0x10c8]
mov ecx, dword [ebp - 0x1100]
push 0
push edx
push edi
call fcn.00409fb0
add ebx, dword [ebp - 0x10c8]
push edi
call fcn.0041313e
add esp, 4
jmp 0x40dac3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x11c], eax
cmp dword [ebp - 0x10c4], 0
ja 0x40da10
push ebx
mov ecx, esi
call fcn.00401340
mov dword [esi + 0x98], ebx
jmp 0x40dae7
mov byte [ebp - 0x10c9], 0
mov eax, dword [ebp - 0x10d0]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edi, dword [ebp - 0x10fc]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edi, 8
cmp dword [ebp - 0x1074], edi
jb 0x40db1d
mov ecx, dword [ebp - 0x1088]
push ecx
call fcn.004119f5
add esp, 4
mov al, byte [ebp - 0x10c9]
jmp 0x40db48
mov dword [esi + 0x11c], 0x57
cmp dword [ebp - 0x1074], edi
jb 0x40db46
mov edx, dword [ebp - 0x1088]
push edx
call fcn.004119f5
add esp, 4
xor al, al
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.00412c12
mov esp, ebp
pop ebp
ret 0xc