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

Disassembly:
mov eax, 0x45ffa7
call fcn.0044b154
sub esp, 0xf4
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, str.fs::doDownloadFile_89
mov dword [ebp - 0x10], esp
xor edi, edi
push esi
mov dword [ebp - 0x24], edi
call fcn.00449520
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], edi
cmp dword [ebx + 0x18], 0x10
mov eax, dword [ebx + 0x30]
jb 0x41d4b6
mov ecx, dword [ebx + 4]
jmp 0x41d4b9
lea ecx, [ebx + 4]
push eax
movzx eax, byte [ebx + 0x58]
push eax
movzx eax, byte [ebx + 0x38]
push eax
push ecx
push esi
push str.___s__url_s__to.f_d__ui_d__len_post__d_
push edi
call fcn.0043a6e3
add esp, 0x1c
push str.http:__
push 7
push edi
push ebx
mov dword [ebx + 0xd8], 2
call fcn.0042974e
test eax, eax
je 0x41d5b4
push str.https:__
push 8
push edi
push ebx
call fcn.0042974e
test eax, eax
je 0x41d5b4
push edi
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x74], 0xf
call fcn.00418c41
lea eax, [ebp - 0x8c]
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.0041e995
cmp byte [ebx + 0x38], 0
pop ecx
je 0x41d548
lea eax, [ebx + 0x60]
push eax
lea eax, [ebp - 0x8c]
call fcn.0041eb2e
pop ecx
jmp 0x41d55a
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebx + 0x3c]
call fcn.00418bb2
xor eax, eax
inc eax
push edi
push eax
lea ecx, [ebp - 0x8c]
mov dword [ebx + 0xd8], eax
call fcn.004192fd
jmp 0x41da24
cmp byte [ebx + 0x59], 0
mov byte [ebp - 0x11], 0
je 0x41d5f6
cmp byte [ebx + 0x38], 0
je 0x41d5f6
mov eax, dword [ebx + 0x5c]
push eax
lea esi, [ebx + 0x60]
push esi
push ebx
push dword [ebp + 8]
call fcn.0041db6c
test al, al
je 0x41d5f6
mov eax, esi
call fcn.0041f36d
push eax
push str.__cache_hit:__d_bytes
push edi
mov dword [ebx + 0x7c], eax
mov byte [ebp - 0x11], 1
call fcn.0043a6e3
add esp, 0xc
cmp byte [ebp - 0x11], 0
jne 0x41d771
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x2c], 3
jge 0x41d953
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], edi
push ebx
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 6
call fcn.00421890
pop ecx
mov dword [ebp - 0x28], edi
mov byte [ebp - 4], 7
cmp byte [ebx + 0x38], 0
je 0x41d6a9
cmp dword [ebx + 0x78], 0x10
jb 0x41d645
mov eax, dword [ebx + 0x64]
jmp 0x41d648
lea eax, [ebx + 0x64]
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov esi, eax
cmp esi, edi
mov dword [ebp - 0x28], esi
je 0x41d66c
cmp esi, 0xffffffff
jne 0x41d6b4
cmp dword [ebx + 0x78], 0x10
jb 0x41d677
mov ebx, dword [ebx + 0x64]
jmp 0x41d67a
add ebx, 0x64
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push ebx
push str.Cant_create_file__s__err_d_
push 1
call fcn.0043a6e3
add esp, 0x10
cmp esi, edi
je 0x41d69c
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esi, [ebp - 0x54]
call fcn.0041da43
jmp 0x41d9c2
push 0xffffffffffffffff
push edi
lea ecx, [ebx + 0x3c]
call fcn.00418b41
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], edi
mov byte [ebp - 4], 8
push dword [ebp - 0x20]
mov ecx, dword [ebx + 0x7c]
push dword [ebp - 0x4c]
lea edx, [ebp - 0x3c]
mov dword [ebp - 0x1c], edi
call fcn.00421eb7
test al, al
pop ecx
pop ecx
jne 0x41d82e
push dword [ebp - 0x30]
mov dword [ebp - 0x1c], 2
push dword [ebp - 0x20]
push str.__inet_read__d_bytes_by__d_portions
push edi
call fcn.0043a6e3
mov eax, dword [ebx + 0x7c]
add esp, 0x10
cmp eax, edi
jbe 0x41d749
cmp dword [ebp - 0x20], eax
je 0x41d749
push 0x468d4a
lea ecx, [ebp - 0xe4]
call fcn.00419fe3
lea eax, [ebp - 0xe4]
push eax
push 1
lea ecx, [ebp - 0x84]
mov byte [ebp - 4], 0xb
call fcn.0041a005
mov byte [ebp - 4], 0xc
push dword [ebx + 0x7c]
push dword [ebp - 0x20]
push str.Invalid_downloaded_content_size__d___d
push eax
jmp 0x41d8a2
cmp dword [ebp - 0x3c], edi
je 0x41d757
push dword [ebp - 0x3c]
call fcn.0044876d
pop ecx
cmp dword [ebp - 0x28], edi
je 0x41d765
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea esi, [ebp - 0x54]
call fcn.0041da43
mov byte [ebp - 4], 0
push str.none
lea ecx, [ebx + 0xbc]
call fcn.00416e6b
test eax, eax
jne 0x41d9fb
cmp dword [ebx + 0x74], edi
jbe 0x41d9fb
lea esi, [ebx + 0x60]
push esi
lea ecx, [ebp - 0x70]
call fcn.0041a15f
push str..html
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 0x10
call fcn.00419fe3
push str..mht
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 0x11
call fcn.00419fe3
lea eax, [ebp - 0xac]
push eax
lea eax, [ebp - 0xc8]
push eax
lea eax, [ebp - 0x70]
push eax
mov byte [ebp - 4], 0x12
call fcn.00446d10
add esp, 0xc
push edi
push 1
lea ecx, [ebp - 0xc8]
mov dword [ebp + 0xc], eax
call fcn.004192fd
push edi
push 1
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 0x10
call fcn.004192fd
cmp dword [ebp + 0xc], edi
je 0x41d9ec
cmp dword [ebp - 0x58], 0x10
mov eax, dword [ebp - 0x6c]
jae 0x41d81c
lea eax, [ebp - 0x6c]
cmp dword [esi + 0x18], 0x10
jb 0x41d9d2
mov esi, dword [esi + 4]
jmp 0x41d9d5
mov eax, dword [ebp - 0x38]
add dword [ebp - 0x20], eax
inc dword [ebp - 0x30]
cmp byte [ebx + 0x38], 0
je 0x41d8b1
push edi
lea ecx, [ebp - 0x40]
push ecx
push eax
push dword [ebp - 0x3c]
xor esi, esi
push dword [ebp - 0x28]
inc esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x40], edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x41d8bd
push 0x468d4a
lea ecx, [ebp - 0x100]
call fcn.00419fe3
lea eax, [ebp - 0x100]
push eax
push esi
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 9
call fcn.0041a005
mov esi, eax
mov byte [ebp - 4], 0xa
cmp dword [ebx + 0x78], 0x10
jb 0x41d891
mov ebx, dword [ebx + 0x64]
jmp 0x41d894
add ebx, 0x64
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push ebx
push str.Cant_save_file__s__err_d_
push esi
call fcn.00419950
add esp, 0x10
mov ecx, eax
call fcn.0041a041
push eax
push dword [ebp - 0x3c]
lea ecx, [ebx + 0x3c]
call fcn.0041462b
cmp byte [ebx + 0x5a], 0
mov dword [ebp - 0x1c], edi
je 0x41d6c7
xor eax, eax
call fcn.00406105
jmp 0x41d6c7
cmp dword [ebp - 0x1c], 2
je 0x41d771
cmp byte [ebx + 0x58], 0
je 0x41d999
push 0x468d4a
lea ecx, [ebp - 0xc8]
call fcn.00419fe3
lea eax, [ebp - 0xc8]
push eax
lea eax, [ebx + 0x60]
push eax
push dword [ebp - 0x1c]
mov byte [ebp - 4], 0xf
or dword [ebp - 0x24], 1
call fcn.00422023
add esp, 0xc
test al, al
mov byte [ebp - 0x12], 1
jne 0x41d99d
mov byte [ebp - 0x12], 0
mov dword [ebp - 4], edi
test byte [ebp - 0x24], 1
je 0x41d9b8
and dword [ebp - 0x24], 0xfffffffe
push edi
push 1
lea ecx, [ebp - 0xc8]
call fcn.004192fd
cmp byte [ebp - 0x12], 0
jne 0x41d5f6
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x18]
call fcn.00419c15
xor al, al
jmp 0x41da32
add esi, 4
push 0
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
push dword [ebp + 8]
lea edi, [ebp - 0x70]
call fcn.0041e491
xor edi, edi
push edi
push 1
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 0
call fcn.004192fd
cmp byte [ebx + 0x59], 0
je 0x41da1a
cmp byte [ebx + 0x38], 0
je 0x41da1a
cmp byte [ebp - 0x11], 0
jne 0x41da1a
mov ecx, dword [ebp + 8]
lea eax, [ebx + 0x60]
push eax
push ebx
call fcn.0041de6c
mov dword [ebx + 0xd8], 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x18]
call fcn.00419c15
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8