Function at 0x103812d
Capabilities:
Initialize winhttp library
Prepare http request

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x78
push ebx
push esi
push edi
xor ebx, ebx
push 0x38
lea eax, [ebp - 0x74]
push ebx
push eax
mov dword [ebp - 0x78], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x3c]
push eax
call fcn.01037e65
mov edi, 0x800
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call esi
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x103817c
mov esi, 0x8007000e
jmp 0x1038376
push edi
xor ecx, ecx
push ebx
mov word [eax], cx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
mov dword [ebp - 8], eax
cmp eax, ebx
jne 0x103819d
mov esi, 0x8007000e
jmp 0x1038351
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x4c], eax
mov eax, 0x400
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x78], 0x3c
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, bx
jne 0x10381c3
sub eax, ecx
lea ecx, [ebp - 0x78]
push ecx
push ebx
sar eax, 1
push eax
push dword [ebp + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x1038202
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x10381f8
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
cmp esi, ebx
jl 0x1038351
push ebx
push ebx
push ebx
push ebx
push 0x1009798
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, dword [ebp + 0x1c]
mov dword [edi], eax
cmp eax, ebx
je 0x103821f
cmp eax, 0xffffffff
jne 0x103823d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1038233
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
cmp esi, ebx
jl 0x1038351
push ebx
push dword [ebp - 0x60]
push dword [ebp - 0x68]
push dword [edi]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, dword [ebp + 0x20]
mov dword [edi], eax
cmp eax, ebx
je 0x103825a
cmp eax, 0xffffffff
jne 0x1038278
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x103826e
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
cmp esi, ebx
jl 0x1038351
cmp dword [ebp - 0x6c], 2
jne 0x1038285
mov eax, 0x800000
jmp 0x1038287
xor eax, eax
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x4c]
push dword [ebp + 0xc]
push dword [edi]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, dword [ebp + 0x24]
mov dword [edi], eax
cmp eax, ebx
je 0x10382a7
cmp eax, 0xffffffff
jne 0x10382c5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x10382bb
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
cmp esi, ebx
jl 0x1038351
push dword [edi]
call fcn.0103764d
mov esi, eax
cmp esi, ebx
jl 0x1038351
lea eax, [ebp - 0x3c]
push eax
push dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
push dword [eax]
call fcn.01037cc3
mov esi, eax
cmp esi, ebx
jl 0x1038351
cmp dword [ebp - 0x30], ebx
jbe 0x1038307
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp + 0x1c]
push dword [eax]
call fcn.01037e0b
mov esi, eax
cmp esi, ebx
jl 0x1038351
cmp esi, 1
je 0x1038351
mov eax, dword [ebp + 0x10]
push ebx
push dword [ebp + 0x18]
neg eax
push dword [ebp + 0x18]
sbb eax, eax
push dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push dword [edi]
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x103832c
xor esi, esi
jmp 0x1038342
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jle 0x1038340
and eax, 0xffff
or eax, 0x80070000
mov esi, eax
push esi
call fcn.01037dd2
test eax, eax
je 0x1038351
cmp dword [ebp - 0x30], ebx
ja 0x10382ee
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call edi
cmp dword [ebp - 8], ebx
je 0x1038376
push dword [ebp - 8]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
lea eax, [ebp - 0x3c]
push eax
call fcn.01037e8a
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x20