Function at 0x10006430
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x202c
call fcn.1018f8a0
mov eax, dword [0x10244540]
xor eax, esp
mov dword [esp + 0x2028], eax
push ebx
push esi
push edi
push 0x2000
lea eax, [esp + 0x34]
mov esi, ecx
push 0
push eax
call fcn.10190ee0
add esp, 0xc
mov dword [esp + 0x18], 0
cmp dword [ebp + 0x1c], 0xf
lea eax, [ebp + 8]
mov dword [esp + 0x1c], 0
cmova eax, dword [ebp + 8]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x100064bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x101ebe8c
call fcn.10001530
add esp, 8
xor ebx, ebx
jmp 0x10006603
lea eax, [esp + 0x28]
xorps xmm0, xmm0
push eax
push esi
movlpd qword [esp + 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x100064f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_source_file_size._Error:__d_n
call fcn.10001530
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
jmp 0x10006603
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
lea eax, [esp + 0x20]
push 1
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x18], xmm0
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push esi
call ebx
test eax, eax
jne 0x10006538
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_current_file_position._Error:__d_n
call fcn.10001530
add esp, 8
xor ebx, ebx
jmp 0x10006603
mov eax, dword [esp + 0x20]
or eax, dword [esp + 0x24]
je 0x10006579
push 0
xorps xmm0, xmm0
push 0
movlpd qword [esp + 0x18], xmm0
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push esi
call ebx
test eax, eax
jne 0x10006579
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_move_file_pointer_to_the_beginning._Error:__d_n
call fcn.10001530
add esp, 8
xor ebx, ebx
jmp 0x10006603
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0x18]
push 0
push eax
push 0x2000
lea eax, [esp + 0x3c]
push eax
push esi
call ebx
test eax, eax
je 0x100065e6
nop word [eax + eax]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10006639
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
lea eax, [esp + 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000662b
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x18]
jne 0x1000662b
push 0
lea eax, [esp + 0x1c]
push eax
push 0x2000
lea eax, [esp + 0x3c]
push eax
push esi
call ebx
test eax, eax
jne 0x100065a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_read_from_source_file._Error:__d_n
call fcn.10001530
add esp, 8
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0xf
jbe 0x1000664a
mov edx, dword [ebp + 8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10006640
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10006661
jmp 0x10006640
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_write_to_destination_file._Error:__d_n
jmp 0x100065f2
mov ebx, 1
jmp 0x100065fc
push ecx
push edx
call fcn.1018eb3e
add esp, 8
mov ecx, dword [esp + 0x2034]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1018e7c9
mov esp, ebp
pop ebp
ret
call fcn.1019b181
int3