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

Disassembly:
mov eax, 0x46813f
call fcn.00452544
sub esp, 0x11c
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, str.fs::doDownloadFile_92
mov dword [ebp - 0x10], esp
xor ebx, ebx
push edi
mov dword [ebp - 0x20], ebx
call fcn.004508dd
pop ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
cmp dword [esi + 0x18], 0x10
mov eax, dword [esi + 0x30]
jb 0x4202fe
mov ecx, dword [esi + 4]
jmp 0x420301
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.00441366
add esp, 0x1c
push str.http:__
push 7
push ebx
push esi
mov dword [esi + 0xd8], 2
call fcn.0042d3ec
test eax, eax
je 0x4203ec
push str.https:__
push 8
push ebx
push esi
call fcn.0042d3ec
test eax, eax
je 0x4203ec
push ebx
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x5c], 0xf
call fcn.0041a911
lea eax, [ebp - 0x74]
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.00421960
cmp byte [esi + 0x38], bl
pop ecx
je 0x420386
lea eax, [esi + 0x60]
push eax
lea eax, [ebp - 0x74]
call fcn.00421af9
pop ecx
jmp 0x420395
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x74]
push eax
lea ecx, [esi + 0x3c]
call fcn.0041ab6e
xor eax, eax
inc eax
push ebx
push eax
lea ecx, [ebp - 0x74]
mov dword [esi + 0xd8], eax
call fcn.0041b05c
jmp 0x420871
cmp byte [esi + 0x59], bl
mov byte [ebp - 0x11], bl
je 0x42042b
cmp byte [esi + 0x38], bl
je 0x42042b
mov eax, dword [esi + 0x5c]
push eax
lea edi, [esi + 0x60]
push edi
push esi
push dword [ebp + 8]
call fcn.00420984
test al, al
je 0x42042b
mov eax, edi
call fcn.004224b5
push eax
push str.__cache_hit:__d_bytes
push ebx
mov dword [esi + 0x7c], eax
mov byte [ebp - 0x11], 1
call fcn.00441366
add esp, 0xc
cmp byte [ebp - 0x11], bl
jne 0x4205ca
mov dword [ebp - 0x2c], ebx
cmp dword [ebp - 0x2c], 2
jge 0x4207aa
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.00424c36
pop ecx
mov dword [ebp - 0x24], ebx
mov byte [ebp - 4], 7
cmp byte [esi + 0x38], bl
je 0x420509
cmp dword [esi + 0x78], 0x10
jb 0x4204a2
mov eax, dword [esi + 0x64]
jmp 0x4204a5
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 0x4204c9
cmp edi, 0xffffffff
jne 0x420514
cmp dword [esi + 0x78], 0x10
jb 0x4204d4
mov esi, dword [esi + 0x64]
jmp 0x4204d7
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.00441366
add esp, 0x10
cmp edi, ebx
je 0x4204f9
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0xf0]
call fcn.0041ff02
jmp 0x420816
push 0xffffffffffffffff
push ebx
lea ecx, [esi + 0x3c]
call fcn.0041a8a0
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.00425464
cmp al, bl
jne 0x420687
push dword [ebp - 0x28]
mov dword [ebp - 0x18], 2
push edi
push str.__inet_read__d_bytes_by__d_portions
push ebx
call fcn.00441366
mov eax, dword [esi + 0x7c]
add esp, 0x10
cmp eax, ebx
jbe 0x4205a0
cmp edi, eax
je 0x4205a0
push 0x471e5a
lea ecx, [ebp - 0x10c]
call fcn.0041be0b
lea eax, [ebp - 0x10c]
push eax
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xb
call fcn.0041be2d
mov byte [ebp - 4], 0xc
push dword [esi + 0x7c]
push edi
push str.Invalid_downloaded_content_size__d___d
push eax
jmp 0x4206fb
cmp dword [ebp - 0x38], ebx
je 0x4205ae
push dword [ebp - 0x38]
call fcn.0044fbbd
pop ecx
cmp dword [ebp - 0x24], ebx
je 0x4205bc
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0xf0]
call fcn.0041ff02
mov byte [ebp - 4], bl
push str.none
lea ecx, [esi + 0xbc]
call fcn.00418bca
test eax, eax
jne 0x42084b
cmp dword [esi + 0x74], ebx
jbe 0x42084b
lea edi, [esi + 0x60]
push edi
lea ecx, [ebp - 0x58]
call fcn.0041bf87
push str..html
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0x10
call fcn.0041be0b
push str..mht
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0x11
call fcn.0041be0b
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.0044dae0
add esp, 0xc
push ebx
push 1
lea ecx, [ebp - 0xb0]
mov dword [ebp + 0xc], eax
call fcn.0041b05c
push ebx
push 1
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0x10
call fcn.0041b05c
cmp dword [ebp + 0xc], ebx
je 0x42083d
cmp dword [ebp - 0x40], 0x10
mov eax, dword [ebp - 0x54]
jae 0x420675
lea eax, [ebp - 0x54]
cmp dword [edi + 0x18], 0x10
jb 0x420826
mov edi, dword [edi + 4]
jmp 0x420829
add edi, dword [ebp - 0x34]
inc dword [ebp - 0x28]
cmp byte [esi + 0x38], bl
je 0x42070a
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 0x420718
push 0x471e5a
lea ecx, [ebp - 0x128]
call fcn.0041be0b
lea eax, [ebp - 0x128]
push eax
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 9
call fcn.0041be2d
mov edi, eax
mov byte [ebp - 4], 0xa
cmp dword [esi + 0x78], 0x10
jb 0x4206ea
mov esi, dword [esi + 0x64]
jmp 0x4206ed
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.0041b692
add esp, 0x10
mov ecx, eax
call fcn.0041be69
push dword [ebp - 0x34]
lea ecx, [esi + 0x3c]
push dword [ebp - 0x38]
call fcn.0041638a
cmp byte [esi + 0x5a], bl
mov dword [ebp - 0x18], ebx
je 0x420526
xor eax, eax
call fcn.00406fac
jmp 0x420526
cmp dword [ebp - 0x18], 2
je 0x4205ca
cmp byte [esi + 0x58], bl
je 0x4207ef
push 0x471e5a
lea ecx, [ebp - 0xb0]
call fcn.0041be0b
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.004258bc
add esp, 0xc
test al, al
mov byte [ebp - 0x12], 1
jne 0x4207f2
mov byte [ebp - 0x12], bl
mov dword [ebp - 4], ebx
test byte [ebp - 0x20], 1
je 0x42080d
and dword [ebp - 0x20], 0xfffffffe
push ebx
push 1
lea ecx, [ebp - 0xb0]
call fcn.0041b05c
cmp byte [ebp - 0x12], bl
jne 0x42042b
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x1c]
call fcn.0041ba42
xor al, al
jmp 0x42087f
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.0042145c
push ebx
push 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], bl
call fcn.0041b05c
cmp byte [esi + 0x59], bl
je 0x420867
cmp byte [esi + 0x38], bl
je 0x420867
cmp byte [ebp - 0x11], bl
jne 0x420867
mov ecx, dword [ebp + 8]
lea eax, [esi + 0x60]
push eax
push esi
call fcn.00420c91
mov dword [esi + 0xd8], 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x1c]
call fcn.0041ba42
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8