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

Disassembly:
mov eax, 0x1030
call fcn.004458e0
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x14], edi
test byte [edi + 8], 1
je 0x42a19d
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 0x42a16f
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x42a173
mov eax, dword [esp + 0x34]
test eax, eax
jl 0x42a19d
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 0x42a19d
call dword [sym.imp.KERNEL32.dll_GetLastError]
test byte [edi + 8], 4
je 0x42a1cc
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 0x42a2f4
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 0x42a1ff
lea eax, [esp + 0x1048]
mov esi, dword [eax]
test esi, esi
mov dword [esp + 0x10], esi
jle 0x42a2b0
jmp 0x42a213
mov esi, dword [esp + 0x10]
push esi
push 0xa
push ebx
call fcn.004495c0
add esp, 0xc
test eax, eax
je 0x42a28c
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 0x42a274
lea eax, [esp + 0x18]
cmp dword [eax], ecx
jl 0x42a27c
lea eax, [esp + 0x2c]
mov eax, dword [eax]
test eax, eax
mov edi, dword [esp + 0x14]
mov dword [esp + 0x10], eax
jg 0x42a20f
jmp 0x42a2b0
test esi, esi
jle 0x42a2b0
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 0x42a2e4
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 0x42a2e4
test eax, eax
je 0x42a32d
add esi, eax
sub ebp, eax
jne 0x42a2c0
mov eax, dword [esp + 0x1044]
mov esi, dword [esp + 0x1048]
sub ebx, eax
cmp esi, ebx
je 0x42a31e
test ebx, ebx
jle 0x42a32d
cmp ebx, esi
jge 0x42a32d
mov eax, dword [esp + 0x1044]
sub esi, ebx
add eax, ebx
mov dword [esp + 0x1048], esi
mov dword [esp + 0x1044], eax
jmp 0x42a144
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