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

Disassembly:
sub esp, 0x38
push ebx
push 0x500001
call fcn.00445f00
mov ebx, eax
xor ecx, ecx
add esp, 4
cmp ebx, ecx
mov dword [esp + 0x18], ebx
je 0x451a2f
mov byte [ebx], cl
mov al, byte [esp + 0x54]
push ebp
mov ebp, dword [esp + 0x4c]
push esi
mov esi, dword [esp + 0x54]
push edi
lea edi, [ebx + 0x100000]
and edi, 0xfff00000
test al, al
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], ecx
jne 0x451a9d
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x14], ecx
mov al, byte [esp + 0x60]
neg al
sbb eax, eax
and eax, 0xf0100000
add eax, 0x10000000
test esi, esi
mov dword [esp + 0x18], eax
jl 0x451c08
jg 0x451a8e
test ebp, ebp
jbe 0x451c08
mov ebx, dword [esp + 0x4c]
cdq
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
jmp 0x451ac0
mov eax, dword [esp + 0x5c]
cdq
push ecx
add eax, ebp
push 0x200
adc edx, esi
push edx
push eax
call fcn.004b1940
mov dword [esp + 0x14], eax
jmp 0x451a66
mov ebp, dword [esp + 0x54]
lea ecx, [ecx]
mov eax, dword [esp + 0x5c]
test eax, eax
jne 0x451adb
mov eax, dword [esp + 0x14]
cdq
cmp esi, edx
jl 0x451adb
jg 0x451ad7
cmp ebp, eax
jbe 0x451adb
xor cl, cl
jmp 0x451add
mov cl, 1
cmp esi, dword [esp + 0x3c]
jl 0x451aef
jg 0x451aeb
cmp ebp, dword [esp + 0x38]
jbe 0x451aef
mov ebp, dword [esp + 0x18]
test cl, cl
mov edx, dword [esp + 0x50]
mov eax, ebp
je 0x451ba1
mov edx, dword [esp + 0x5c]
mov ebp, 0x200
xor eax, eax
sub ebp, edx
cmp eax, esi
jl 0x451b1a
jg 0x451b16
cmp ebp, dword [esp + 0x54]
jbe 0x451b1a
mov ebp, dword [esp + 0x54]
or edx, 0xffffffff
push 1
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
lea edx, [esp + 0x34]
push edx
xor ecx, ecx
push ecx
xor eax, eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [esp + 0x14]
push eax
push 0x200
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 0x5c]
mov esi, dword [esp + 0x50]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
mov dword [esp + 0x20], edi
add edi, edx
mov edx, dword [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
or eax, 0xffffffff
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x38]
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x58]
mov eax, 0x200
jmp 0x451bb1
mov cl, byte [esp + 0x60]
test cl, cl
je 0x451bb1
and ebp, 0xfffffe00
mov eax, ebp
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
push edx
push ebx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
sub eax, ebp
sbb esi, 0
add ecx, ebp
test esi, esi
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], esi
mov dword [esp + 0x50], ecx
mov dword [esp + 0x5c], 0
jg 0x451ab9
jl 0x451c04
test eax, eax
ja 0x451ab9
mov ebx, dword [esp + 0x24]
test ebx, ebx
pop edi
pop esi
pop ebp
je 0x451c22
mov edx, dword [0x51927c]
add ebx, 0xfffffff8
push ebx
push 0
push edx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
pop ebx
add esp, 0x38
ret