Function at 0x104fc2f
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x268
mov eax, dword [0x10ed860]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x22c], ebx
mov eax, dword [0x10ed030]
cmp eax, 0x10ed030
je 0x104fc83
test byte [eax + 0x1c], 1
je 0x104fc83
cmp byte [eax + 0x19], 5
jb 0x104fc83
push esi
push dword [ebp + 8]
push 0x1005120
push 0xf8
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01059cca
push edi
xor edi, edi
mov dword [ebp - 0x208], edi
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x210], edi
mov dword [ebp - 0x218], edi
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x214], edi
mov dword [ebp - 0x20c], edi
cmp esi, edi
je 0x104ff43
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, di
jne 0x104fcbd
sub eax, edx
sar eax, 1
je 0x104ff43
cmp ebx, 0xffffffff
je 0x104ff43
cmp ebx, edi
je 0x104ff43
push 0x3c
pop ebx
push ebx
lea eax, [ebp - 0x268]
push edi
push eax
call sub.msvcrt.dll_memset
or dword [ebp - 0x238], 0xffffffff
or dword [ebp - 0x260], 0xffffffff
add esp, 0xc
lea eax, [ebp - 0x204]
mov dword [ebp - 0x258], eax
lea eax, [ebp - 0x268]
push eax
push edi
push edi
push esi
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x254], 0x100
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x104ff32
push edi
push edi
push edi
push 1
push 0x1005238
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov esi, eax
mov dword [ebp - 0x21c], esi
cmp esi, edi
je 0x104ff32
mov eax, 0x3a98
push eax
push eax
push eax
push 0x2710
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
test eax, eax
je 0x104ff32
push edi
push 0x4000
push 0x104fc09
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
cmp eax, 0xffffffff
je 0x104ff32
push edi
push dword [ebp - 0x250]
lea eax, [ebp - 0x204]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x214], eax
cmp eax, edi
je 0x104ff32
cmp dword [ebp - 0x25c], 2
jne 0x104fdc2
mov eax, 0x800000
jmp 0x104fdc4
xor eax, eax
push eax
push edi
push edi
push edi
push dword [ebp - 0x23c]
push 0x100522c
push dword [ebp - 0x214]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
mov dword [ebp - 0x20c], esi
cmp esi, edi
je 0x104ff32
push edi
push edi
push edi
push edi
push edi
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x104ff32
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x104ff32
mov dword [ebp - 0x224], edi
lea eax, [ebp - 0x208]
push eax
push dword [ebp - 0x20c]
mov dword [ebp - 0x208], edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x104ff32
mov eax, dword [ebp - 0x208]
cmp eax, edi
je 0x104ff23
add dword [ebp - 0x224], eax
mov ecx, dword [ebp - 0x224]
cmp ecx, dword [ebp + 8]
ja 0x104ff27
inc eax
cmp dword [ebp - 0x218], eax
jae 0x104fea0
push dword [ebp - 0x210]
call fcn.010a0a51
mov eax, dword [ebp - 0x208]
inc eax
push eax
call fcn.010a0a62
mov ebx, eax
pop ecx
pop ecx
mov dword [ebp - 0x210], ebx
cmp ebx, edi
je 0x104ff2e
mov eax, dword [ebp - 0x208]
inc eax
mov dword [ebp - 0x218], eax
jmp 0x104fea6
mov ebx, dword [ebp - 0x210]
push dword [ebp - 0x218]
push edi
push ebx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x208]
push ebx
push dword [ebp - 0x20c]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x104ff32
mov eax, dword [ebp - 0x220]
cmp eax, dword [ebp - 0x208]
ja 0x104ff3c
xor esi, esi
cmp eax, edi
jbe 0x104ff17
push edi
lea ecx, [ebp - 0x228]
push ecx
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [ebp - 0x22c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x104ff32
add esi, dword [ebp - 0x228]
mov eax, dword [ebp - 0x220]
cmp esi, eax
jb 0x104fee8
cmp dword [ebp - 0x208], edi
ja 0x104fe1a
xor ebx, ebx
jmp 0x104ff46
mov ebx, 0x2070
jmp 0x104ff46
push 0xe
jmp 0x104ff45
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x104ff46
mov ebx, 0x570
jmp 0x104ff46
push 0x57
pop ebx
push dword [ebp - 0x210]
call fcn.010a0a51
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
pop ecx
cmp dword [ebp - 0x20c], edi
je 0x104ff68
push dword [ebp - 0x20c]
call esi
cmp dword [ebp - 0x214], edi
je 0x104ff78
push dword [ebp - 0x214]
call esi
cmp dword [ebp - 0x21c], edi
pop edi
je 0x104ff89
push dword [ebp - 0x21c]
call esi
mov eax, dword [0x10ed030]
cmp eax, 0x10ed030
je 0x104ffc5
test byte [eax + 0x1c], 1
je 0x104ffc5
movzx ecx, byte [eax + 0x19]
mov edx, ebx
neg edx
sbb edx, edx
and edx, 0xfffffffd
add edx, 5
cmp ecx, edx
jl 0x104ffc5
push ebx
push 0x1005120
push 0xf9
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010294b2
mov ecx, dword [ebp - 4]
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.010a0c4b
leave
ret 0xc