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

Disassembly:
mov eax, 0x4686af
call fcn.00452ab4
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.00450e4d
pop ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
cmp dword [esi + 0x18], 0x10
mov eax, dword [esi + 0x30]
jb 0x4206b5
mov ecx, dword [esi + 4]
jmp 0x4206b8
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.004418d2
add esp, 0x1c
push str.http:__
push 7
push ebx
push esi
mov dword [esi + 0xd8], 2
call fcn.0042d958
test eax, eax
je 0x4207a3
push str.https:__
push 8
push ebx
push esi
call fcn.0042d958
test eax, eax
je 0x4207a3
push ebx
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x5c], 0xf
call fcn.0041acc8
lea eax, [ebp - 0x74]
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.00421d17
cmp byte [esi + 0x38], bl
pop ecx
je 0x42073d
lea eax, [esi + 0x60]
push eax
lea eax, [ebp - 0x74]
call fcn.00421eb0
pop ecx
jmp 0x42074c
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x74]
push eax
lea ecx, [esi + 0x3c]
call fcn.0041af25
xor eax, eax
inc eax
push ebx
push eax
lea ecx, [ebp - 0x74]
mov dword [esi + 0xd8], eax
call fcn.0041b413
jmp 0x420c28
cmp byte [esi + 0x59], bl
mov byte [ebp - 0x11], bl
je 0x4207e2
cmp byte [esi + 0x38], bl
je 0x4207e2
mov eax, dword [esi + 0x5c]
push eax
lea edi, [esi + 0x60]
push edi
push esi
push dword [ebp + 8]
call fcn.00420d3b
test al, al
je 0x4207e2
mov eax, edi
call fcn.0042286c
push eax
push str.__cache_hit:__d_bytes
push ebx
mov dword [esi + 0x7c], eax
mov byte [ebp - 0x11], 1
call fcn.004418d2
add esp, 0xc
cmp byte [ebp - 0x11], bl
jne 0x420981
mov dword [ebp - 0x2c], ebx
cmp dword [ebp - 0x2c], 2
jge 0x420b61
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.00424fed
pop ecx
mov dword [ebp - 0x24], ebx
mov byte [ebp - 4], 7
cmp byte [esi + 0x38], bl
je 0x4208c0
cmp dword [esi + 0x78], 0x10
jb 0x420859
mov eax, dword [esi + 0x64]
jmp 0x42085c
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 0x420880
cmp edi, 0xffffffff
jne 0x4208cb
cmp dword [esi + 0x78], 0x10
jb 0x42088b
mov esi, dword [esi + 0x64]
jmp 0x42088e
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.004418d2
add esp, 0x10
cmp edi, ebx
je 0x4208b0
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0xf0]
call fcn.004202b9
jmp 0x420bcd
push 0xffffffffffffffff
push ebx
lea ecx, [esi + 0x3c]
call fcn.0041ac57
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.0042581b
cmp al, bl
jne 0x420a3e
push dword [ebp - 0x28]
mov dword [ebp - 0x18], 2
push edi
push str.__inet_read__d_bytes_by__d_portions
push ebx
call fcn.004418d2
mov eax, dword [esi + 0x7c]
add esp, 0x10
cmp eax, ebx
jbe 0x420957
cmp edi, eax
je 0x420957
push 0x472e5a
lea ecx, [ebp - 0x10c]
call fcn.0041c1c2
lea eax, [ebp - 0x10c]
push eax
push 1
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 0xb
call fcn.0041c1e4
mov byte [ebp - 4], 0xc
push dword [esi + 0x7c]
push edi
push str.Invalid_downloaded_content_size__d___d
push eax
jmp 0x420ab2
cmp dword [ebp - 0x38], ebx
je 0x420965
push dword [ebp - 0x38]
call fcn.0045012d
pop ecx
cmp dword [ebp - 0x24], ebx
je 0x420973
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0xf0]
call fcn.004202b9
mov byte [ebp - 4], bl
push str.none
lea ecx, [esi + 0xbc]
call fcn.00418f81
test eax, eax
jne 0x420c02
cmp dword [esi + 0x74], ebx
jbe 0x420c02
lea edi, [esi + 0x60]
push edi
lea ecx, [ebp - 0x58]
call fcn.0041c33e
push str..html
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0x10
call fcn.0041c1c2
push str..mht
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 0x11
call fcn.0041c1c2
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.0044e050
add esp, 0xc
push ebx
push 1
lea ecx, [ebp - 0xb0]
mov dword [ebp + 0xc], eax
call fcn.0041b413
push ebx
push 1
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0x10
call fcn.0041b413
cmp dword [ebp + 0xc], ebx
je 0x420bf4
cmp dword [ebp - 0x40], 0x10
mov eax, dword [ebp - 0x54]
jae 0x420a2c
lea eax, [ebp - 0x54]
cmp dword [edi + 0x18], 0x10
jb 0x420bdd
mov edi, dword [edi + 4]
jmp 0x420be0
add edi, dword [ebp - 0x34]
inc dword [ebp - 0x28]
cmp byte [esi + 0x38], bl
je 0x420ac1
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 0x420acf
push 0x472e5a
lea ecx, [ebp - 0x128]
call fcn.0041c1c2
lea eax, [ebp - 0x128]
push eax
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 9
call fcn.0041c1e4
mov edi, eax
mov byte [ebp - 4], 0xa
cmp dword [esi + 0x78], 0x10
jb 0x420aa1
mov esi, dword [esi + 0x64]
jmp 0x420aa4
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.0041ba49
add esp, 0x10
mov ecx, eax
call fcn.0041c220
push dword [ebp - 0x34]
lea ecx, [esi + 0x3c]
push dword [ebp - 0x38]
call fcn.00416754
cmp byte [esi + 0x5a], bl
mov dword [ebp - 0x18], ebx
je 0x4208dd
xor eax, eax
call fcn.00406fac
jmp 0x4208dd
cmp dword [ebp - 0x18], 2
je 0x420981
cmp byte [esi + 0x58], bl
je 0x420ba6
push 0x472e5a
lea ecx, [ebp - 0xb0]
call fcn.0041c1c2
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.00425c73
add esp, 0xc
test al, al
mov byte [ebp - 0x12], 1
jne 0x420ba9
mov byte [ebp - 0x12], bl
mov dword [ebp - 4], ebx
test byte [ebp - 0x20], 1
je 0x420bc4
and dword [ebp - 0x20], 0xfffffffe
push ebx
push 1
lea ecx, [ebp - 0xb0]
call fcn.0041b413
cmp byte [ebp - 0x12], bl
jne 0x4207e2
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x1c]
call fcn.0041bdf9
xor al, al
jmp 0x420c36
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.00421813
push ebx
push 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], bl
call fcn.0041b413
cmp byte [esi + 0x59], bl
je 0x420c1e
cmp byte [esi + 0x38], bl
je 0x420c1e
cmp byte [ebp - 0x11], bl
jne 0x420c1e
mov ecx, dword [ebp + 8]
lea eax, [esi + 0x60]
push eax
push esi
call fcn.00421048
mov dword [esi + 0xd8], 1
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x1c]
call fcn.0041bdf9
mov al, 1
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8