Function at 0x458470
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x2020c
call fcn.0046a9e0
mov eax, dword [0x4b38b4]
xor eax, esp
mov dword [esp + 0x20208], eax
cmp dword [esp + 0x20220], 0
mov eax, dword [esp + 0x20224]
push ebx
mov ebx, dword [esp + 0x20218]
push ebp
mov ebp, dword [esp + 0x20218]
push esi
push edi
mov dword [esp + 0x14], eax
je 0x4584ba
test eax, eax
je 0x4584ba
mov byte [0], 0
mov eax, dword [ebx]
push 0
lea esi, [ebx + 0x42a8]
mov ecx, 0x40
lea edi, [esp + 0x11c]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0042c140
add esp, 4
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0044e640
add esp, 0xc
test eax, eax
je 0x458645
push 0
lea eax, [ebx + 0x42a8]
push 0x100
push eax
call fcn.0044e640
add esp, 0xc
test eax, eax
je 0x458645
mov ecx, dword [ebx]
lea edx, [ebx + 8]
push edx
lea eax, [esp + 0x1c]
push eax
push ecx
call fcn.0042bdb0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x45864a
push ebx
call fcn.0042be90
add esp, 4
test eax, eax
je 0x458726
cmp dword [esp + 0x14], esi
je 0x45855d
mov esi, dword [esp + 0x20228]
mov edi, dword [esp + 0x2022c]
add esi, 0x20000
adc edi, 0
jmp 0x458561
xor esi, esi
xor edi, edi
push 0
push 0
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x4586d7
push 0
lea edx, [esp + 0x14]
push edx
push 0x20000
lea eax, [esp + 0x224]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4586d7
cmp dword [esp + 0x10], 0x200
jb 0x4586cf
push ebx
push 0
lea ecx, [esp + 0x420]
push 0x1fe00
push ecx
call fcn.0042cef0
add esp, 0x10
push 0
push 0
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x4586d7
push 0
lea edx, [esp + 0x14]
push edx
push 0x20000
lea eax, [esp + 0x224]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4586d7
cmp dword [esp + 0x10], 0x20000
jne 0x458645
cmp dword [esp + 0x14], 0
jne 0x4586e1
cmp dword [esp + 0x20230], 0
jne 0x4586e1
mov ecx, dword [ebx]
push 0
push ecx
mov dword [esp + 0x1c], 1
call fcn.0042c140
add esp, 4
push eax
lea edx, [esp + 0x20]
push edx
call fcn.0044e640
add esp, 0xc
test eax, eax
jne 0x4584f1
mov esi, 0x1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x18]
mov edx, 0x100
mov ebx, edx
mov ecx, edi
lea ecx, [ecx]
mov byte [ecx], 0
inc ecx
sub ebx, 1
jne 0x458660
lea esp, [esp]
dec edx
mov byte [edi], 0
inc edi
test edx, edx
jne 0x458670
lea edi, [esp + 0x118]
mov edx, 0x100
mov ebx, edx
mov ecx, edi
lea esp, [esp]
mov byte [ecx], 0
inc ecx
sub ebx, 1
jne 0x458690
lea esp, [esp]
dec edx
mov byte [edi], 0
inc edi
test edx, edx
jne 0x4586a0
test esi, esi
je 0x4586b4
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x20218]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00469f7b
add esp, 0x2020c
ret
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, 1
jmp 0x45864a
mov edx, dword [ebx]
mov ecx, 0x40
lea esi, [esp + 0x118]
lea edi, [ebx + 0x42a8]
lea eax, [ebx + 8]
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [ebx + 0x41a8]
push ecx
push edx
call fcn.0042bdb0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x45864a
push ebx
call fcn.0042be90
add esp, 4
test eax, eax
jne 0x45864a
mov esi, 0x1b
jmp 0x45864a