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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101a978b
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x3078
call fcn.10167b70
mov eax, dword [0x1021afe8]
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 esi, ecx
xor ebx, ebx
mov dword [ebp - 0x3018], 0
mov dword [ebp - 0x3030], 0
mov dword [ebp - 0x302c], ebx
mov dword [ebp - 0x3028], ebx
push 0x3c
lea eax, [ebp - 0x3088]
mov dword [ebp - 4], ebx
push ebx
push eax
mov byte [ebp - 4], 1
call fcn.1016ca40
mov eax, dword [esi + 0x10]
add esp, 0xc
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x3088], 0x3c
mov dword [ebp - 0x3080], 0xffffffff
mov dword [ebp - 0x3074], 0xffffffff
mov dword [ebp - 0x3058], 0xffffffff
mov dword [ebp - 0x3050], 0xffffffff
jb 0x100303d0
mov esi, dword [esi]
lea ecx, [ebp - 0x3088]
push ecx
push 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x100303ec
xor bl, bl
jmp 0x100306dd
push 0
xor eax, eax
mov ecx, 0x800000
cmp dword [ebp - 0x307c], 2
push 0
cmove eax, ecx
push 0
mov dword [ebp - 0x3024], eax
movzx eax, word [ebp - 0x3070]
push 0
push str.WinHTTP_Example_1.0
mov dword [ebp - 0x3020], eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
mov dword [ebp - 0x3048], edi
test edi, edi
je 0x100303e5
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
lea eax, [ebp - 0x3034]
push 4
push eax
push 3
push edi
mov dword [ebp - 0x3034], 0xfa0
call esi
test eax, eax
jne 0x10030458
xor bl, bl
jmp 0x100306d2
push 4
lea eax, [ebp - 0x3038]
mov dword [ebp - 0x3038], 0xfa0
push eax
push 5
push edi
call esi
test eax, eax
jne 0x1003047b
xor bl, bl
jmp 0x100306d2
push 4
lea eax, [ebp - 0x303c]
mov dword [ebp - 0x303c], 0xfa0
push eax
push 6
push edi
call esi
test eax, eax
jne 0x1003049e
xor bl, bl
jmp 0x100306d2
push 0x800
lea eax, [ebp - 0x814]
push 0
push eax
call fcn.1016ca40
push dword [ebp - 0x3074]
lea eax, [ebp - 0x814]
push dword [ebp - 0x3078]
push 0x400
push eax
call fcn.10176c00
add esp, 0x1c
lea eax, [ebp - 0x814]
push 0
push dword [ebp - 0x3020]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov esi, eax
mov dword [ebp - 0x304c], esi
test esi, esi
jne 0x100304fa
xor bl, bl
jmp 0x100306d2
push 0x800
lea eax, [ebp - 0x1014]
push 0
push eax
call fcn.1016ca40
push dword [ebp - 0x3058]
lea eax, [ebp - 0x1014]
push dword [ebp - 0x305c]
push 0x400
push eax
call fcn.10176c00
add esp, 0x1c
lea eax, [ebp - 0x1014]
push dword [ebp - 0x3024]
push 0
push 0
push 0
push eax
push 0x101f53a8
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x3020], esi
test esi, esi
jne 0x1003055f
xor bl, bl
jmp 0x100306c1
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x1003057d
xor bl, bl
jmp 0x100306b6
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x10030591
xor bl, bl
jmp 0x100306b6
push 0
lea eax, [ebp - 0x3040]
mov dword [ebp - 0x3044], 0
push eax
lea eax, [ebp - 0x3044]
mov dword [ebp - 0x3040], 4
push eax
push 0
push 0x20000005
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
push 0x2000
lea eax, [ebp - 0x3014]
push 0
push eax
call fcn.1016ca40
add esp, 0xc
lea eax, [ebp - 0x3018]
push eax
push 0x2000
lea eax, [ebp - 0x3014]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x100305fe
xor bl, bl
jmp 0x100306b6
mov eax, dword [ebp - 0x3018]
test eax, eax
je 0x1003065b
lea eax, [ebp - 0x3014]
push eax
push 0x101f53b0
call fcn.1002ed90
mov eax, dword [ebp - 0x3018]
lea ecx, [ebp - 0x3014]
add esp, 8
mov byte [ebp - 0x3024], 0
add eax, ecx
push dword [ebp - 0x3024]
push eax
mov eax, ecx
lea ecx, [ebp - 0x3030]
push eax
push ebx
call fcn.10030ae0
mov eax, dword [ebp - 0x3018]
mov ebx, dword [ebp - 0x302c]
test eax, eax
jne 0x100305c3
lea ecx, [ebp - 0x3030]
call fcn.10030150
test al, al
jne 0x1003066e
xor bl, bl
jmp 0x100306b6
lea ecx, [ebp - 0x3030]
call fcn.10030240
test al, al
jne 0x10030681
xor bl, bl
jmp 0x100306b6
mov edx, dword [ebp - 0x302c]
sub esp, 0x18
mov ecx, dword [ebp - 0x3030]
sub edx, ecx
call fcn.1002fd30
add esp, 0x18
mov bl, 1
jmp 0x100306b6
test esi, esi
je 0x100306c1
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x304c]
test eax, eax
je 0x100306d2
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test edi, edi
je 0x100306dd
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea ecx, [ebp - 0x3030]
call fcn.1000d970
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.1016700d
mov esp, ebp
pop ebp
ret