Function at 0x10003630
Capabilities:
Check http status code
Clear file content
Create directory
Create http request
Download and write a file
Get common file path
Get file size
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Reference http user-agent string
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10029abb
mov eax, dword fs:[0]
push eax
mov eax, 0x4144
call fcn.10019f40
mov eax, dword [0x1005bbb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4150], edi
mov eax, dword [edi + 4]
mov dword [eax + 0x818], 0
mov eax, dword [edi + 4]
test eax, eax
je 0x10003d05
add eax, 0x400
push eax
call fcn.10002380
mov esi, eax
add esp, 4
xor eax, eax
test esi, esi
je 0x10003d05
mov dword [ebp - 0x4124], 7
mov dword [ebp - 0x4128], eax
mov word [ebp - 0x4138], ax
xor ebx, ebx
mov dword [ebp - 0x4118], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x4144], ebx
cmp word [esi], bx
jne 0x100036cd
xor ecx, ecx
jmp 0x100036e1
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100036d2
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x4138]
call fcn.10006250
push esi
call fcn.10018de3
add esp, 4
cmp dword [ebp - 0x4128], 0xa
jae 0x10003707
xor ebx, ebx
jmp 0x10003cec
mov eax, dword [edi + 4]
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__compatible__MSIE_9.0__Windows_NT_6.1__WOW64__Trident_5.0_
mov dword [eax + 0x818], 3
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [ebp - 0x4148], esi
test esi, esi
je 0x10003cc6
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea ecx, [ecx]
push 4
lea eax, [ebp - 0x413c]
mov dword [ebp - 0x413c], 0xbb8
push eax
push 2
push esi
call dword [sym.imp.WININET.dll_InternetSetOptionW]
cmp dword [ebp - 0x4124], 8
lea eax, [ebp - 0x4138]
push 0
cmovae eax, dword [ebp - 0x4138]
push SysReAllocString
push 0
push 0
push eax
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
test esi, esi
je 0x10003cb4
push 0x2000
lea eax, [ebp - 0x4114]
push 0
push eax
call fcn.1001a5c0
add esp, 0xc
mov dword [ebp - 0x4118], 0x1000
lea eax, [ebp - 0x4118]
push 0
push eax
lea eax, [ebp - 0x4114]
push eax
push 0x13
push esi
call ebx
test eax, eax
je 0x10003cad
lea eax, [ebp - 0x4114]
push eax
call fcn.10018d73
add esp, 4
cmp eax, 0xc8
je 0x100038c3
cmp eax, 0x12d
je 0x100037f6
cmp eax, 0x12e
jne 0x10003cad
push 0x2000
lea eax, [ebp - 0x4114]
push 0
push eax
call fcn.1001a5c0
add esp, 0xc
mov dword [ebp - 0x4118], 0x1000
lea eax, [ebp - 0x4118]
push 0
push eax
lea eax, [ebp - 0x4114]
push eax
push 0x21
push esi
call ebx
test eax, eax
je 0x10003cad
cmp dword [ebp - 0x4124], 8
lea eax, [ebp - 0x4138]
mov dword [ebp - 0x4128], 0
cmovae eax, dword [ebp - 0x4138]
xor ecx, ecx
mov word [eax], cx
cmp word [ebp - 0x4114], cx
je 0x1000387f
lea ecx, [ebp - 0x4114]
lea edx, [ecx + 2]
jmp 0x10003870
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10003870
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x4114]
push eax
lea ecx, [ebp - 0x4138]
call fcn.10006250
push 0
lea eax, [ebp - 0x4118]
mov dword [ebp - 0x4118], 0x2000
push eax
lea eax, [ebp - 0x4114]
push eax
push 0x23
push esi
call ebx
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [ebp - 0x4148]
jmp 0x10003740
push 0x800
lea eax, [ebp - 0x1114]
push 0
push eax
call fcn.1001a5c0
add esp, 0xc
lea eax, [ebp - 0x1114]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.atmp_
lea eax, [ebp - 0x1114]
push 0x400
push eax
call fcn.10019564
add esp, 0xc
lea eax, [ebp - 0x1114]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0x914], ax
lea eax, [ebp - 0x912]
push eax
call fcn.1001a5c0
mov eax, dword [edi + 4]
add esp, 0xc
cmp byte [eax + 0x800], 0
je 0x100039b6
cmp dword [ebp - 0x4124], 8
lea eax, [ebp - 0x4138]
cmovae eax, dword [ebp - 0x4138]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea eax, [ebp - 0x914]
push 0x400
push eax
call fcn.100195d0
add esp, 0xc
cmp word [ebp - 0x914], 0
jne 0x10003992
lea eax, [ebp - 0x914]
push eax
push 0
push 0x1002aab8
lea eax, [ebp - 0x1114]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp - 0x914]
push eax
call fcn.100058f0
add esp, 4
test eax, eax
je 0x10003a05
push eax
push dword [edi + 4]
call fcn.100012d0
add esp, 8
jmp 0x10003a71
lea eax, [ebp - 0x1114]
push eax
lea eax, [ebp - 0x914]
push 0x400
push eax
call fcn.100195d0
push dword [edi + 4]
call fcn.10002380
add esp, 0x10
mov dword [ebp - 0x4140], eax
test eax, eax
je 0x10003977
push eax
lea eax, [ebp - 0x914]
push 0x400
push eax
call fcn.10019564
push dword [ebp - 0x4140]
call fcn.10018de3
add esp, 0x10
jmp 0x10003992
push 0x103
lea eax, [ebp - 0x113]
mov byte [ebp - 0x114], 0
push 0
push eax
call fcn.1001a5c0
lea eax, [ebp - 0x1114]
push eax
call fcn.100058f0
add esp, 0x10
mov dword [ebp - 0x4140], eax
test eax, eax
je 0x10003a71
push dword [edi + 4]
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.10018e67
push dword [ebp - 0x4140]
push dword [edi + 4]
call fcn.100012d0
lea eax, [ebp - 0x114]
push eax
push 0x400
push dword [edi + 4]
call fcn.10018ebc
add esp, 0x20
mov eax, dword [edi + 4]
add eax, 0x810
mov dword [ebp - 0x411c], 0
push 0
mov dword [ebp - 0x414c], eax
lea eax, [ebp - 0x4118]
push eax
lea eax, [ebp - 0x411c]
mov dword [ebp - 0x4120], 0
push eax
push 0x20000005
push esi
mov dword [ebp - 0x4118], 4
call ebx
test eax, eax
je 0x10003cad
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea eax, [ebp - 0x914]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10003b06
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x4120], eax
cmp eax, dword [ebp - 0x411c]
jne 0x10003b06
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10003ca0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x80
push 2
push 0
push 3
push 0x40000000
lea eax, [ebp - 0x914]
mov dword [ebp - 0x4120], 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4140], eax
cmp eax, 0xffffffff
je 0x10003cad
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edx, dword [edi + 4]
lea eax, [ebp - 0x2113]
mov ecx, dword [ebp - 0x411c]
push 0xfff
push 0
mov dword [edx + 0x814], ecx
push eax
mov byte [ebp - 0x2114], 0
call fcn.1001a5c0
push 0xc
call fcn.1001889b
mov ebx, eax
add esp, 0x10
lea eax, [ebp - 0x4118]
xorps xmm0, xmm0
movq qword [ebx], xmm0
push eax
mov dword [ebx + 8], 0
lea eax, [ebp - 0x2114]
mov ecx, dword [edi + 8]
push 0x5dc
push eax
mov dword [ebx], ecx
mov ecx, dword [edi + 4]
push esi
mov dword [ebx + 4], ecx
mov dword [ebx + 8], 0
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x10003c83
mov edi, dword [ebp - 0x414c]
lea esp, [esp]
mov eax, dword [ebp - 0x4118]
test eax, eax
je 0x10003c7d
mov ecx, dword [edi]
cmp ecx, dword [ebp - 0x411c]
je 0x10003c7d
add eax, ecx
mov dword [edi], eax
push 0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1002ac10]
mov eax, dword [ebp - 0x411c]
cvtpd2ps xmm1, xmm0
movd xmm0, eax
mulss xmm1, dword [0x1002ac00]
shr eax, 0x1f
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x1002ac10]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
cvttss2si eax, xmm1
mov dword [ebx + 8], eax
lea eax, [ebp - 0x4120]
push eax
push dword [ebp - 0x4118]
lea eax, [ebp - 0x2114]
push eax
push dword [ebp - 0x4140]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x4118]
push eax
push 0x5dc
lea eax, [ebp - 0x2114]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x10003bd0
mov edi, dword [ebp - 0x4150]
push dword [ebp - 0x4140]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 8], 0x64
mov dword [ebp - 0x4144], 1
mov eax, dword [edi + 4]
mov dword [eax + 0x818], 1
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x4148]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebx, dword [ebp - 0x4144]
mov eax, dword [edi + 4]
test eax, eax
je 0x10003cec
mov byte [eax + 0x801], 1
xorps xmm0, xmm0
mov eax, dword [edi + 4]
mov byte [eax + 0x802], 0
mov eax, dword [edi + 4]
movsd qword [eax + 0x808], xmm0
cmp dword [ebp - 0x4124], 8
jb 0x10003d03
push dword [ebp - 0x4138]
call fcn.10018745
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10019adf
mov esp, ebp
pop ebp
ret