Function at 0x458d70
Capabilities:
Get file size
Write file on windows

Disassembly:
mov eax, 0x1030
call fcn.00463720
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x14], edi
test byte [edi + 8], 1
je 0x458ddd
mov eax, dword [edi]
lea ecx, [esp + 0x38]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x34], eax
jne 0x458daf
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x458db3
mov eax, dword [esp + 0x34]
test eax, eax
jl 0x458ddd
push 2
xor eax, eax
lea edx, [esp + 0x2c]
push edx
push eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
jne 0x458ddd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test byte [edi + 8], 4
je 0x458e0c
mov esi, dword [esp + 0x1048]
mov edx, dword [esp + 0x1044]
mov eax, dword [edi]
push 0
lea ecx, [esp + 0x34]
push ecx
push esi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [esp + 0x30]
jmp 0x458f34
mov eax, dword [esp + 0x1048]
mov ebx, dword [esp + 0x1044]
lea ecx, [ebx + eax]
cmp eax, 0x1000
lea ebp, [esp + 0x3c]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], 0x1000
lea eax, [esp + 0x10]
jg 0x458e3f
lea eax, [esp + 0x1048]
mov esi, dword [eax]
test esi, esi
mov dword [esp + 0x10], esi
jle 0x458ef0
jmp 0x458e53
mov esi, dword [esp + 0x10]
push esi
push 0xa
push ebx
call fcn.004687f0
add esp, 0xc
test eax, eax
je 0x458ecc
sub eax, ebx
mov ecx, eax
mov edx, ecx
shr ecx, 2
mov edi, ebp
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
add ebp, eax
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x20]
mov byte [ebp], 0xd
inc ebp
lea ebx, [ebx + eax + 1]
mov byte [ebp], 0xa
inc ebp
lea eax, [esp + 0x103c]
sub eax, ebp
sub ecx, ebx
mov dword [esp + 0x10], eax
test eax, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x2c], ecx
lea eax, [esp + 0x10]
jg 0x458eb4
lea eax, [esp + 0x18]
cmp dword [eax], ecx
jl 0x458ebc
lea eax, [esp + 0x2c]
mov eax, dword [eax]
test eax, eax
mov edi, dword [esp + 0x14]
mov dword [esp + 0x10], eax
jg 0x458e4f
jmp 0x458ef0
test esi, esi
jle 0x458ef0
mov ecx, esi
mov eax, ecx
shr ecx, 2
mov esi, ebx
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x14]
add ebp, eax
add ebx, eax
lea esi, [esp + 0x3c]
mov ecx, esi
sub ebp, ecx
je 0x458f24
lea ebx, [ebx]
mov eax, dword [edi]
push 0
lea edx, [esp + 0x20]
push edx
push ebp
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x458f24
test eax, eax
je 0x458f6d
add esi, eax
sub ebp, eax
jne 0x458f00
mov eax, dword [esp + 0x1044]
mov esi, dword [esp + 0x1048]
sub ebx, eax
cmp esi, ebx
je 0x458f5e
test ebx, ebx
jle 0x458f6d
cmp ebx, esi
jge 0x458f6d
mov eax, dword [esp + 0x1044]
sub esi, ebx
add eax, ebx
mov dword [esp + 0x1048], esi
mov dword [esp + 0x1044], eax
jmp 0x458d84
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x1030
ret 8
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1030
ret 8