Function at 0x10036a10
Capabilities:
Check if file exists
Connect to http server
Create http request
Get file size
Get http content length
Parse url
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1009763a
mov eax, dword fs:[0]
push eax
mov eax, 0x5878
call fcn.1007e4b0
mov eax, dword [0x100b0380]
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 - 4], 1
mov eax, dword [0x100e1328]
and eax, 2
xor ebx, ebx
xor ecx, ecx
or eax, ecx
lea esi, [ebx + 8]
je 0x10036b21
push 0x103
lea eax, [ebp - 0x11b]
push ebx
push eax
mov byte [ebp - 0x11c], cl
call fcn.1007dcf0
add esp, 0xc
cmp dword [ebp + 0x20], esi
jb 0x10036a8b
mov edi, dword [ebp + 0xc]
cmp edi, ebx
jne 0x10036a8e
xor eax, eax
jmp 0x10036ab7
lea edi, [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x10036aa1
xor eax, eax
jmp 0x10036ab7
lea esi, [eax + eax]
mov eax, esi
call fcn.1007e4e0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.100377b0
lea ecx, [ebp - 0x11c]
push ecx
mov ecx, eax
call fcn.10036750
add esp, 4
lea edx, [ebp - 0x11c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jle 0x10036ae4
xor eax, eax
jmp 0x10036afe
lea eax, [esi + esi]
call fcn.1007e4e0
mov eax, esp
push 3
push esi
lea ecx, [ebp - 0x11c]
push ecx
push eax
call fcn.10035c60
mov ecx, eax
lea esi, [ecx + 2]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x10036b03
sub ecx, esi
sar ecx, 1
push ecx
push eax
lea esi, [ebp + 8]
call fcn.10013510
mov esi, 8
push 0x1fe
lea eax, [ebp - 0x61a]
xor edx, edx
push ebx
push eax
mov word [ebp - 0x61c], dx
call fcn.1007dcf0
add esp, 0xc
push 0xfe
lea edx, [ebp - 0x31a]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0x31c], cx
call fcn.1007dcf0
add esp, 0xc
push 0xfe
lea ecx, [ebp - 0x41a]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x41c], ax
call fcn.1007dcf0
add esp, 0xc
push 0x1046
lea eax, [ebp - 0x26aa]
xor edx, edx
push ebx
push eax
mov word [ebp - 0x26ac], dx
call fcn.1007dcf0
add esp, 0xc
push 0x38
lea ecx, [ebp - 0x5880]
push ebx
push ecx
call fcn.1007dcf0
lea eax, [ebp - 0x31c]
mov dword [ebp - 0x5868], eax
mov eax, 0x80
mov dword [ebp - 0x5864], eax
mov dword [ebp - 0x585c], eax
xor eax, eax
lea edx, [ebp - 0x61c]
lea ecx, [ebp - 0x41c]
mov dword [ebp - 0x5874], edx
mov dword [ebp - 0x5860], ecx
lea edx, [ebp - 0x26ac]
mov dword [ebp - 0x583c], eax
mov dword [ebp - 0x5838], eax
mov eax, dword [ebp + 0x1c]
add esp, 0xc
xor edi, edi
lea ecx, [ebp + 8]
mov dword [ebp - 0x5884], 0x3c
mov dword [ebp - 0x5870], pe_nt_image_headers32
mov dword [ebp - 0x5858], edx
mov dword [ebp - 0x5854], 0x824
mov dword [ebp - 0x5834], ebx
mov dword [ebp - 0x5824], ebx
mov dword [ebp - 0x5830], ebx
mov dword [ebp - 0x5840], ebx
call fcn.10037740
test eax, eax
je 0x100374ba
mov eax, dword [ebp + 0x38]
lea ecx, [ebp + 0x24]
call fcn.10037740
test eax, eax
je 0x100374ba
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x20], esi
jae 0x10036c63
lea eax, [ebp + 0xc]
lea ecx, [ebp - 0x5884]
push ecx
push 0
push 0
push eax
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
mov eax, dword [ebp - 0x5878]
mov ebx, 4
je 0x10036c89
cmp eax, 3
je 0x10036c94
cmp eax, ebx
je 0x10036c94
xor esi, esi
jmp 0x10037366
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
xor edx, edx
cmp eax, ebx
sete dl
push ebx
lea eax, [ebp - 0x5820]
push eax
push 2
push 0
mov dword [ebp - 0x5820], 0xbb8
mov edi, edx
mov dword [ebp - 0x5828], edi
call esi
push ebx
lea ecx, [ebp - 0x5820]
push ecx
push 5
push 0
call esi
push ebx
lea edx, [ebp - 0x5820]
push edx
push 6
push 0
call esi
push ebx
lea eax, [ebp - 0x5820]
push eax
push 7
push 0
call esi
push ebx
lea ecx, [ebp - 0x5820]
push ecx
push 8
push 0
call esi
push 0
push 0
push 0
push 0
push 0x100a0e30
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x5834], eax
test eax, eax
jne 0x10036d1d
xor esi, esi
jmp 0x10037366
mov ecx, dword [ebp - 0x586c]
push 0
push 0
push 3
lea edx, [ebp - 0x41c]
push edx
lea eax, [ebp - 0x31c]
push eax
mov eax, dword [ebp - 0x5834]
push ecx
lea edx, [ebp - 0x61c]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x5824], eax
test eax, eax
jne 0x10036d5d
xor esi, esi
jmp 0x10037366
xor ecx, ecx
push 0x1046
push ecx
lea edx, [ebp - 0x1662]
push edx
mov word [ebp - 0x1664], cx
call fcn.1007dcf0
add esp, 0xc
cmp dword [ebp - 0x5854], 0
je 0x10036da3
mov eax, dword [ebp - 0x5858]
lea edx, [ebp - 0x1664]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x10036d92
jmp 0x10036dc7
xor eax, eax
jmp 0x10036db0
movzx ecx, word [eax + 0x100a0488]
mov word [ebp + eax - 0x1664], cx
add eax, 2
test cx, cx
jne 0x10036db0
mov edx, dword [ebp - 0x5824]
mov eax, edi
neg eax
push 0
sbb eax, eax
and eax, 0x800000
add eax, 0x80000000
push eax
push 0
push 0x1009edfc
push str.HTTP_1.1
lea ecx, [ebp - 0x1664]
push ecx
push str.HEAD
push edx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x5830], eax
call fcn.10035f20
mov esi, eax
test esi, esi
je 0x10037366
mov edx, dword [ebp - 0x5830]
push 0
lea eax, [ebp - 0x5848]
push eax
lea ecx, [ebp - 0x582c]
push ecx
push 0x20000005
push edx
mov dword [ebp - 0x582c], 0
mov dword [ebp - 0x5848], ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov dword [ebp - 0x5810], eax
test eax, eax
mov eax, dword [ebp - 0x582c]
je 0x10036e66
cmp eax, 0x3e800000
jbe 0x10036e66
xor esi, esi
jmp 0x10037366
cmp eax, 0x6400000
jae 0x10036ecb
sub esp, 0x1c
mov edx, 0x1009edfc
mov eax, esp
mov dword [ebp - 0x5844], esp
call fcn.10013330
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x582c]
push 1
dec eax
push eax
push 0
sub esp, 0x1c
lea ecx, [ebp + 0x24]
mov esi, esp
mov dword [ebp - 0x5828], esp
call fcn.10017150
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x5824]
lea ecx, [ebp - 0x1664]
push ecx
push edx
push edi
mov byte [ebp - 4], 1
call fcn.10036030
add esp, 0x50
mov esi, eax
jmp 0x10037366
xor esi, esi
push 0x1048
lea eax, [ebp - 0x5808]
push esi
push eax
mov dword [ebp - 0x580c], esi
call fcn.1007dcf0
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x47a8], 7
mov dword [ebp - 0x47ac], esi
mov word [ebp - 0x47bc], cx
mov byte [ebp - 4], bl
push 0x10037530
push 0x100375b0
push 2
xor eax, eax
push 0x1074
lea edx, [ebp - 0x4798]
push edx
mov dword [ebp - 0x47a4], eax
mov dword [ebp - 0x47a0], eax
mov dword [ebp - 0x479c], eax
call fcn.1007b7fe
mov byte [ebp - 4], 5
mov dword [ebp - 0x581c], esi
lea ebx, [ebp - 0x5808]
lea esi, [ebp - 0x1664]
mov eax, ebx
sub esi, eax
mov dword [ebp - 0x5814], esi
jmp 0x10036f66
mov esi, dword [ebp - 0x5814]
mov ecx, dword [ebp - 0x5824]
mov dword [ebx - 4], ecx
mov edx, 0x104
mov eax, ebx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x10036f96
movzx ecx, word [esi + eax]
test cx, cx
je 0x10036f96
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x10036f76
jmp 0x10036f9a
test edx, edx
jne 0x10036f9d
sub eax, 2
xor edx, edx
mov word [eax], dx
xor eax, eax
xor ecx, ecx
push 0x206
mov word [ebp - 0x5818], ax
push ecx
lea eax, [ebp - 0x21a]
push eax
mov word [ebp - 0x5816], cx
mov word [ebp - 0x21c], dx
call fcn.1007dcf0
mov ecx, dword [ebp + 0x28]
add esp, 0xc
cmp dword [ebp + 0x3c], 8
jae 0x10036fdc
lea ecx, [ebp + 0x28]
lea edx, [ebp - 0x21c]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x10036fe2
mov ecx, dword [ebp - 0x581c]
push ecx
lea edx, [ebp - 0x5818]
push 0x100a03e4
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x5818]
add esp, 0xc
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10037017
lea edi, [ebp - 0x21c]
sub eax, edx
add edi, 0xfffffffe
lea ecx, [ecx]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x10037030
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebx + 0x1048]
and ecx, 3
push eax
lea edx, [ebp - 0x21c]
rep movsb byte es:[edi], byte [esi]
call fcn.10016260
mov eax, dword [ebp - 0x581c]
mov ecx, dword [ebp - 0x5828]
sub dword [ebp - 0x5814], 0x1074
inc eax
mov dword [ebx + 0x106c], ecx
add ebx, 0x1074
mov dword [ebp - 0x581c], eax
cmp eax, 3
jb 0x10036f60
mov ecx, dword [ebp - 0x582c]
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
lea eax, [edx - 1]
mov dword [ebp - 0x3730], edx
add edx, edx
xor esi, esi
mov dword [ebp - 0x47a0], eax
lea eax, [edx - 1]
dec ecx
mov dword [ebp - 0x47a4], esi
mov dword [ebp - 0x372c], eax
mov dword [ebp - 0x26bc], edx
mov dword [ebp - 0x26b8], ecx
lea edi, [ebp - 0x580c]
lea ebx, [ebx]
push 0
push 0
push edi
push 0x10036590
push 0
push 0
call ebx
mov dword [ebp + esi*4 - 0x5840], eax
inc esi
add edi, 0x1074
cmp esi, 3
jb 0x100370e0
xor esi, esi
cmp dword [ebp - 0x5840], esi
je 0x10037344
cmp dword [ebp - 0x583c], esi
je 0x10037344
cmp dword [ebp - 0x5838], esi
je 0x10037344
push 0x6ddd00
push 1
lea ecx, [ebp - 0x5840]
push ecx
push 3
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x10037498
cmp dword [ebp + 0x3c], 8
mov eax, dword [ebp + 0x28]
jae 0x10037153
lea eax, [ebp + 0x28]
push esi
push 0x80
push 2
push esi
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x5818], eax
cmp eax, 0xffffffff
je 0x10037476
mov dword [ebp - 0x5814], esi
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x21a]
push eax
mov word [ebp - 0x21c], dx
call fcn.1007dcf0
mov ecx, dword [ebp + 0x28]
add esp, 0xc
cmp dword [ebp + 0x3c], 8
jae 0x100371a9
lea ecx, [ebp + 0x28]
lea edx, [ebp - 0x21c]
nop
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x100371b0
mov ecx, dword [ebp - 0x5814]
push ecx
lea edx, [ebp - 0x5828]
push 0x100a03e4
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x5828]
add esp, 0xc
mov esi, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x100371e5
lea edi, [ebp - 0x21c]
sub eax, esi
add edi, 0xfffffffe
jmp 0x10037200
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x10037200
mov ecx, eax
shr ecx, 2
push 0
rep movsd dword es:[edi], dword [esi]
push 0x80
push 3
push 0
push 1
mov ecx, eax
push connect
lea eax, [ebp - 0x21c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1003733a
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1003741e
push 0x100da440
push ebx
call fcn.10079cfe
mov edi, eax
add esp, 8
test edi, edi
je 0x10037444
push 0
lea ecx, [ebp - 0x581c]
push ecx
push ebx
push edi
push esi
mov dword [ebp - 0x581c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x581c]
mov ebx, dword [ebp - 0x5818]
push 0
lea edx, [ebp - 0x5844]
push edx
push eax
push edi
push ebx
mov dword [ebp - 0x5844], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.100799fa
mov eax, dword [ebp - 0x5814]
inc eax
add esp, 4
cmp eax, 3
mov dword [ebp - 0x5814], eax
jl 0x1003717f
mov ecx, ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 0x28]
mov esi, 8
cmp dword [ebp + 0x3c], esi
jae 0x100372fa
lea eax, [ebp + 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1003746a
cmp dword [ebp + 0x40], 0
je 0x1003749e
mov eax, dword [ebp + 0x28]
cmp dword [ebp + 0x3c], esi
jae 0x1003731e
lea eax, [ebp + 0x28]
call fcn.10025aa0
test eax, eax
je 0x1003749e
mov dword [ebp - 0x5810], 1
jmp 0x1003749e
mov dword [ebp - 0x5810], 0
mov byte [ebp - 4], 1
push 0x10037530
push 3
push 0x1074
lea ecx, [ebp - 0x580c]
push ecx
call fcn.1007b8c1
mov esi, dword [ebp - 0x5810]
mov eax, dword [ebp - 0x5840]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x10037379
push eax
call edi
mov eax, dword [ebp - 0x583c]
test eax, eax
je 0x10037386
push eax
call edi
mov eax, dword [ebp - 0x5838]
test eax, eax
je 0x10037393
push eax
call edi
mov eax, dword [ebp - 0x5830]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
test eax, eax
je 0x100373a6
push eax
call edi
mov eax, dword [ebp - 0x5824]
test eax, eax
je 0x100373b3
push eax
call edi
mov eax, dword [ebp - 0x5834]
test eax, eax
je 0x100373c0
push eax
call edi
mov byte [ebp - 4], 0
mov ebx, 8
cmp dword [ebp + 0x20], ebx
jb 0x100373da
mov edx, dword [ebp + 0xc]
push edx
call fcn.100799fa
add esp, 4
mov edi, 7
xor eax, eax
mov dword [ebp + 0x20], edi
mov dword [ebp + 0x1c], 0
mov word [ebp + 0xc], ax
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x3c], ebx
jb 0x10037407
mov ecx, dword [ebp + 0x28]
push ecx
call fcn.100799fa
add esp, 4
xor edx, edx
mov dword [ebp + 0x3c], edi
mov dword [ebp + 0x38], 0
mov word [ebp + 0x28], dx
mov eax, esi
jmp 0x10037504
mov dword [ebp - 0x5810], 0
mov byte [ebp - 4], 1
push 0x10037530
push 3
push 0x1074
lea edx, [ebp - 0x580c]
push edx
jmp 0x1003735b
mov dword [ebp - 0x5810], 0
mov byte [ebp - 4], 1
push 0x10037530
push 3
push 0x1074
lea eax, [ebp - 0x580c]
push eax
jmp 0x1003735b
mov dword [ebp - 0x5810], 0
jmp 0x1003749e
mov dword [ebp - 0x5810], esi
mov byte [ebp - 4], 1
push 0x10037530
push 3
push 0x1074
lea edx, [ebp - 0x580c]
push edx
jmp 0x1003735b
mov dword [ebp - 0x5810], esi
mov byte [ebp - 4], 1
push 0x10037530
push 3
push 0x1074
lea eax, [ebp - 0x580c]
push eax
jmp 0x1003735b
mov byte [ebp - 4], bl
cmp dword [ebp + 0x20], esi
jb 0x100374ce
mov eax, dword [ebp + 0xc]
push eax
call fcn.100799fa
add esp, 4
mov esi, 7
xor ecx, ecx
mov dword [ebp + 0x20], esi
mov dword [ebp + 0x1c], ebx
mov word [ebp + 0xc], cx
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x3c], 8
jb 0x100374f8
mov edx, dword [ebp + 0x28]
push edx
call fcn.100799fa
add esp, 4
xor eax, eax
mov dword [ebp + 0x3c], esi
mov dword [ebp + 0x38], ebx
mov word [ebp + 0x28], ax
lea esp, [ebp - 0x5894]
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.10079a05
mov esp, ebp
pop ebp
ret