Function at 0x41fa79
Capabilities:
Copy file
Write file on windows

Disassembly:
mov eax, 0x466d0e
call fcn.00451324
sub esp, 0x11c
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, str.fs::doDownloadFile_89
mov dword [ebp - 0x10], esp
xor ebx, ebx
push edi
mov dword [ebp - 0x20], ebx
call fcn.0044f750
pop ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
cmp dword [esi + 0x18], 0x10
mov eax, dword [esi + 0x30]
jb 0x41fab7
mov ecx, dword [esi + 4]
jmp 0x41faba
lea ecx, [esi + 4]
push eax
movzx eax, byte [esi + 0x58]
push eax
movzx eax, byte [esi + 0x38]
push eax
push ecx
push edi
push str.___s__url_s__to.f_d__ui_d__len_post__d_
push ebx
call fcn.0043fb8a
add esp, 0x1c
push str.http:__
push 7
push ebx
push esi
mov dword [esi + 0xd8], 2
call fcn.0042c970
test eax, eax
je 0x41fba5
push str.https:__
push 8
push ebx
push esi
call fcn.0042c970
test eax, eax
je 0x41fba5
push ebx
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x5c], 0xf
call fcn.0041a131
lea eax, [ebp - 0x74]
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.00420f66
cmp byte [esi + 0x38], bl
pop ecx
je 0x41fb3f
lea eax, [esi + 0x60]
push eax
lea eax, [ebp - 0x74]
call fcn.004210ff
pop ecx
jmp 0x41fb4e
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x74]
push eax
lea ecx, [esi + 0x3c]
call fcn.0041a38e
xor eax, eax
inc eax
push ebx
push eax
lea ecx, [ebp - 0x74]
mov dword [esi + 0xd8], eax
call fcn.0041a87c
jmp 0x42002a
cmp byte [esi + 0x59], bl
mov byte [ebp - 0x11], bl
je 0x41fbe4
cmp byte [esi + 0x38], bl
je 0x41fbe4
mov eax, dword [esi + 0x5c]
push eax
lea edi, [esi + 0x60]
push edi
push esi
push dword [ebp + 8]
call fcn.0042013d
test al, al
je 0x41fbe4
mov eax, edi
call fcn.00421abb
push eax
push str.__cache_hit:__d_bytes
push ebx
mov dword [esi + 0x7c], eax
mov byte [ebp - 0x11], 1
call fcn.0043fb8a
add esp, 0xc
cmp byte [ebp - 0x11], bl
jne 0x41fd83
mov dword [ebp - 0x2c], ebx
cmp dword [ebp - 0x2c], 2
jge 0x41ff63
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xf0], ebx
mov dword [ebp - 0xec], ebx
mov dword [ebp - 0xe8], ebx
mov dword [ebp - 0xe4], ebx
mov dword [ebp - 0xe0], ebx
mov dword [ebp - 0xdc], ebx
mov dword [ebp - 0xd8], ebx
mov dword [ebp - 0xd4], ebx
mov dword [ebp - 0xd0], ebx
push esi
lea ecx, [ebp - 0xf0]
mov byte [ebp - 4], 6
call fcn.00424233
pop ecx
mov dword [ebp - 0x24], ebx
mov byte [ebp - 4], 7
cmp byte [esi + 0x38], bl
je 0x41fcc2
cmp dword [esi + 0x78], 0x10
jb 0x41fc5b
mov eax, dword [esi + 0x64]
jmp 0x41fc5e
lea eax, [esi + 0x64]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x24], edi
je 0x41fc82
cmp edi, 0xffffffff
jne 0x41fccd
cmp dword [esi + 0x78], 0x10
jb 0x41fc8d
mov esi, dword [esi + 0x64]
jmp 0x41fc90
add esi, 0x64
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
push str.Cant_create_file__s__err_d_
push 1
call fcn.0043fb8a
add esp, 0x10
cmp edi, ebx
je 0x41fcb2
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0xf0]
call fcn.0041f6bb
jmp 0x41ffcf
push 0xffffffffffffffff
push ebx
lea ecx, [esi + 0x3c]
call fcn.0041a0c0
xor edi, edi
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov byte [ebp - 4], 8
push dword [esi + 0x7c]
lea eax, [ebp - 0x38]
push edi
push eax
lea ecx, [ebp - 0xf0]
mov dword [ebp - 0x18], ebx
call fcn.00424a5b
cmp al, bl
jne 0x41fe40
push dword [ebp - 0x28]
mov dword [ebp - 0x18], 2
push edi
push str.__inet_read__d_bytes_by__d_portions
push ebx
call fcn.0043fb8a
mov eax, dword [esi + 0x7c]
add esp, 0x10
cmp eax, ebx
jbe 0x41fd59
cmp edi, eax
je 0x41fd59
push 0x470e4a
lea ecx, [ebp - 0x10c]
call fcn.0041b5d0
lea eax, [ebp - 0x10c]
push eax
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xb
call fcn.0041b5f2
mov byte [ebp - 4], 0xc
push dword [esi + 0x7c]
push edi
push str.Invalid_downloaded_content_size__d___d
push eax
jmp 0x41feb4
cmp dword [ebp - 0x38], ebx
je 0x41fd67
push dword [ebp - 0x38]
call fcn.0044e99d
pop ecx
cmp dword [ebp - 0x24], ebx
je 0x41fd75
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0xf0]
call fcn.0041f6bb
mov byte [ebp - 4], bl
push str.none
lea ecx, [esi + 0xbc]
call fcn.004183ea
test eax, eax
jne 0x420004
cmp dword [esi + 0x74], ebx
jbe 0x420004
lea edi, [esi + 0x60]
push edi
lea ecx, [ebp - 0x58]
call fcn.0041b74c
push str..html
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0x10
call fcn.0041b5d0
push str..mht
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0x11
call fcn.0041b5d0
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0xb0]
push eax
lea eax, [ebp - 0x58]
push eax
mov byte [ebp - 4], 0x12
call fcn.0044c300
add esp, 0xc
push ebx
push 1
lea ecx, [ebp - 0xb0]
mov dword [ebp + 0xc], eax
call fcn.0041a87c
push ebx
push 1
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0x10
call fcn.0041a87c
cmp dword [ebp + 0xc], ebx
je 0x41fff6
cmp dword [ebp - 0x40], 0x10
mov eax, dword [ebp - 0x54]
jae 0x41fe2e
lea eax, [ebp - 0x54]
cmp dword [edi + 0x18], 0x10
jb 0x41ffdf
mov edi, dword [edi + 4]
jmp 0x41ffe2
add edi, dword [ebp - 0x34]
inc dword [ebp - 0x28]
cmp byte [esi + 0x38], bl
je 0x41fec3
push ebx
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x34]
mov dword [ebp - 0x18], 1
push dword [ebp - 0x38]
mov dword [ebp - 0x3c], ebx
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x41fed1
push 0x470e4a
lea ecx, [ebp - 0x128]
call fcn.0041b5d0
lea eax, [ebp - 0x128]
push eax
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 9
call fcn.0041b5f2
mov edi, eax
mov byte [ebp - 4], 0xa
cmp dword [esi + 0x78], 0x10
jb 0x41fea3
mov esi, dword [esi + 0x64]
jmp 0x41fea6
add esi, 0x64
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
push str.Cant_save_file__s__err_d_
push edi
call fcn.0041aecf
add esp, 0x10
mov ecx, eax
call fcn.0041b62e
push dword [ebp - 0x34]
lea ecx, [esi + 0x3c]
push dword [ebp - 0x38]
call fcn.00415baa
cmp byte [esi + 0x5a], bl
mov dword [ebp - 0x18], ebx
je 0x41fcdf
xor eax, eax
call fcn.004069f6
jmp 0x41fcdf
cmp dword [ebp - 0x18], 2
je 0x41fd83
cmp byte [esi + 0x58], bl
je 0x41ffa8
push 0x470e4a
lea ecx, [ebp - 0xb0]
call fcn.0041b5d0
lea eax, [ebp - 0xb0]
push eax
lea eax, [esi + 0x60]
push eax
push dword [ebp - 0x18]
mov byte [ebp - 4], 0xf
or dword [ebp - 0x20], 1
call fcn.00424eb3
add esp, 0xc
test al, al
mov byte [ebp - 0x12], 1
jne 0x41ffab
mov byte [ebp - 0x12], bl
mov dword [ebp - 4], ebx
test byte [ebp - 0x20], 1
je 0x41ffc6
and dword [ebp - 0x20], 0xfffffffe
push ebx
push 1
lea ecx, [ebp - 0xb0]
call fcn.0041a87c
cmp byte [ebp - 0x12], bl
jne 0x41fbe4
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x1c]
call fcn.0041b202
xor al, al
jmp 0x420038
add edi, 4
push ebx
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
push dword [ebp + 8]
lea edi, [ebp - 0x58]
call fcn.00420a62
push ebx
push 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], bl
call fcn.0041a87c
cmp byte [esi + 0x59], bl
je 0x420020
cmp byte [esi + 0x38], bl
je 0x420020
cmp byte [ebp - 0x11], bl
jne 0x420020
mov ecx, dword [ebp + 8]
lea eax, [esi + 0x60]
push eax
push esi
call fcn.0042043d
mov dword [esi + 0xd8], 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x1c]
call fcn.0041b202
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8