Function at 0x10003116
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference http user-agent string
Write file on windows

Disassembly:
push 0x5c
mov eax, 0x10047e7f
call fcn.100263df
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 0x10]
lea ecx, [ebp - 0x2c]
mov esi, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x28], ebx
mov dword [eax], ebx
mov dword [ebp - 0x24], esi
call fcn.100014cb
lea ecx, [ebp - 0x1c]
call fcn.100014cb
lea ecx, [ebp - 0x18]
call fcn.100014cb
push 0x3c
pop edi
push edi
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 4
push ebx
push eax
mov dword [ebp - 0x14], ebx
call fcn.10029370
add esp, 0xc
mov dword [ebp - 0x68], edi
or eax, 0xffffffff
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
push ecx
push ebx
push dword [eax - 0xc]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x1000331d
mov esi, dword [ebp - 0x54]
mov edi, dword [ebp - 0x58]
call fcn.10017e9c
push eax
push esi
push edi
lea ecx, [ebp - 0x20]
call fcn.100012ed
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x1c]
call fcn.100015bb
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], 4
lea ecx, [ecx - 0x10]
call fcn.10005108
push dword [ebp - 0x3c]
lea ecx, [ebp - 0x20]
call fcn.10001421
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 6
call fcn.100015bb
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], 4
lea ecx, [ecx - 0x10]
call fcn.10005108
push ebx
push ebx
push ebx
push ebx
push str.Mozilla_5.0__Windows_NT_10.0_
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
jne 0x10003218
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x24]
jmp 0x10003323
push ebx
push dword [ebp - 0x50]
push dword [ebp - 0x1c]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov edi, eax
mov dword [ebp - 0x28], edi
test edi, edi
je 0x1000320a
cmp dword [ebp - 0x5c], 2
mov ecx, 0x800000
mov eax, ebx
cmove eax, ecx
push eax
push ebx
push ebx
push ebx
push dword [ebp - 0x18]
push 0x1004bbdc
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
je 0x1000331d
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov edi, eax
test edi, edi
je 0x10003277
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov edi, eax
mov eax, dword [ebp + 0xc]
cmp dword [eax - 4], 1
jle 0x1000328e
push dword [eax - 0xc]
lea ecx, [ebp + 0xc]
call fcn.10002be9
mov eax, dword [ebp + 0xc]
push 0x1004bbfc
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.1002c7ac
add esp, 0xc
test eax, eax
jne 0x1000331d
test edi, edi
je 0x10003325
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], ebx
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x1000331d
mov eax, dword [ebp - 0x10]
inc eax
push eax
call fcn.1001794e
mov edi, eax
pop ecx
test edi, edi
je 0x10003312
mov ecx, dword [ebp - 0x10]
inc ecx
push ecx
push ebx
push edi
call fcn.10029370
add esp, 0xc
mov dword [ebp - 0x24], ebx
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x10]
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x10003301
push dword [ebp - 0x14]
push 1
push dword [ebp - 0x24]
push edi
call fcn.100359ed
add esp, 0x10
push edi
call fcn.10017949
mov eax, dword [ebp - 0x10]
pop ecx
mov ecx, dword [ebp + 0x10]
add dword [ecx], eax
jmp 0x10003317
mov eax, ebx
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x100032a8
jmp 0x10003325
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp dword [ebp - 0x14], 0
je 0x10003334
push dword [ebp - 0x14]
call fcn.1003574a
pop ecx
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test esi, esi
je 0x10003341
push esi
call edi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x1000334b
push eax
call edi
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x10003355
push eax
call edi
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx - 0x10]
call fcn.10005108
mov ecx, dword [ebp - 0x1c]
lea ecx, [ecx - 0x10]
call fcn.10005108
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.10005108
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.10005108
mov ecx, dword [ebp + 0xc]
lea ecx, [ecx - 0x10]
call fcn.10005108
mov eax, ebx
call fcn.100263ad
ret