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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x482978]
push ebx
xor ebx, ebx
mov dword [ebp - 0x20], eax
cmp eax, ebx
mov dword [ebp - 0x10], ebx
jle 0x415480
push esi
push edi
mov dword [ebp - 0x1c], 0x64
mov esi, 0x42fa7c
push dword [ebp - 0x10]
mov ecx, 0x48296c
call fcn.00421fff
mov edi, eax
mov dword [ebp - 0x14], edi
push dword [edi + 0x28]
call fcn.00414cd2
test al, al
pop ecx
je 0x415468
lea eax, [edi + 4]
mov ecx, 0x482408
push eax
mov dword [ebp - 0xc], eax
call fcn.00418e4f
add edi, 0x10
mov ecx, 0x482408
push edi
call fcn.00418e4f
mov eax, dword [ebp - 0x14]
mov ecx, 0x482408
add eax, 0x1c
push eax
mov dword [ebp - 8], eax
call fcn.00418e4f
mov ecx, dword [ebp - 0xc]
push 1
push ebx
push 0x42fb94
call fcn.0041f9a1
mov ecx, dword [ebp - 0xc]
push eax
push ebx
call fcn.0041fe73
push eax
lea ecx, [ebp - 0x44]
call fcn.0041f009
push 1
lea ecx, [ebp - 0x44]
call fcn.0041ff07
push eax
call fcn.0040ef3c
pop ecx
pop ecx
mov ecx, dword [ebp - 0xc]
call fcn.0041ff07
push eax
call fcn.0040f27e
test al, al
pop ecx
jne 0x415184
mov ecx, dword [ebp - 0xc]
call fcn.0041ff07
push 0x482c84
push eax
mov ecx, 0x482c78
call fcn.00425a20
mov ecx, dword [ebp - 0xc]
push ebx
push 0x80
push 4
push ebx
push 1
push 0x40000000
call fcn.0041ff07
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
cmp dword [eax], 1
jne 0x415265
mov ecx, dword [ebp - 0xc]
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
call fcn.0041ff07
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x415460
push ebx
push edi
mov dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x24]
push 2
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 8]
lea ecx, [ebp - 0x50]
call fcn.0041f009
cmp dword [ebp - 0x14], ebx
jbe 0x415231
cmp dword [ebp - 0x14], 1
jbe 0x415226
push 2
push ebx
push 0xfffffffffffffffe
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x28]
push ebx
push eax
lea eax, [ebp - 4]
push 2
push eax
push edi
mov byte [ebp - 4], bl
mov byte [ebp - 3], bl
mov byte [ebp - 2], bl
mov dword [ebp - 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 4]
push eax
push esi
call fcn.00428830
pop ecx
test eax, eax
pop ecx
je 0x415231
push ebx
push ebx
push esi
lea ecx, [ebp - 0x50]
call fcn.0041fbe6
push ebx
push esi
lea ecx, [ebp - 0x50]
call fcn.0041f20d
lea eax, [ebp - 0x2c]
push ebx
push eax
lea ecx, [ebp - 0x50]
push dword [ebp - 0x50]
mov dword [ebp - 0x2c], ebx
call fcn.0041ff07
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x50]
jmp 0x415443
lea ecx, [ebp - 0x38]
call fcn.0041ef35
mov ecx, dword [ebp - 0xc]
push ebx
push ebx
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x38]
call fcn.0041fd49
test eax, eax
jl 0x415378
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
cmp eax, ebx
jne 0x4152b3
mov ecx, dword [ebp - 8]
push ebx
push esi
call fcn.0041f20d
push ebx
push ebx
mov ecx, dword [ebp - 8]
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x38]
call fcn.0041fbe6
jmp 0x41542f
cmp eax, 2
jne 0x4152e8
push ebx
push esi
mov ecx, edi
call fcn.0041f20d
push ebx
push ebx
mov ecx, edi
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x38]
call fcn.0041f896
cmp eax, 0xffffffff
je 0x415378
mov edi, dword [edi]
push ebx
lea eax, [edi + eax - 2]
jmp 0x415386
cmp eax, 3
jne 0x41530f
push ebx
push esi
mov ecx, edi
call fcn.0041f20d
push ebx
push 1
push ebx
mov ecx, edi
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x38]
call fcn.0041f5dc
jmp 0x41542f
cmp eax, 4
jne 0x415349
push ebx
push esi
mov ecx, edi
call fcn.0041f20d
mov ecx, dword [ebp - 8]
push ebx
push esi
call fcn.0041f20d
push ebx
push ebx
mov ecx, edi
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x38]
call fcn.0041f896
cmp eax, 0xffffffff
je 0x415378
mov edi, dword [edi]
push ebx
add edi, eax
push edi
jmp 0x41529d
cmp eax, 5
jne 0x41538c
push ebx
push esi
mov ecx, edi
call fcn.0041f20d
mov ecx, dword [ebp - 8]
push ebx
push esi
call fcn.0041f20d
push ebx
push ebx
mov ecx, edi
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x38]
call fcn.0041f896
cmp eax, 0xffffffff
jne 0x415385
lea ecx, [ebp - 0x38]
call fcn.0041f06b
jmp 0x415460
push ebx
push eax
jmp 0x41529d
cmp eax, 6
jne 0x41540d
lea ecx, [ebp - 0x68]
call fcn.0041ef35
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x18], ebx
call fcn.0041ef35
push dword [ebp - 0x18]
lea ecx, [ebp - 0x38]
call fcn.0041fb98
test al, al
je 0x4153ef
lea eax, [ebp - 0x68]
lea ecx, [ebp - 0x38]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.0041faf5
mov ecx, edi
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x68]
call fcn.0041fe3b
test al, al
jne 0x4153a4
lea eax, [ebp - 0x68]
lea ecx, [ebp - 0x5c]
push eax
call fcn.0041f28b
push ebx
push esi
lea ecx, [ebp - 0x5c]
call fcn.0041f20d
jmp 0x4153a4
lea eax, [ebp - 0x5c]
lea ecx, [ebp - 0x38]
push eax
call fcn.0041f146
lea ecx, [ebp - 0x5c]
call fcn.0041f06b
lea ecx, [ebp - 0x68]
call fcn.0041f06b
jmp 0x41542f
cmp eax, 7
jne 0x41542f
mov ecx, dword [ebp - 8]
push 1
push ebx
push ebx
call fcn.0041ff07
push eax
mov ecx, edi
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x38]
call fcn.0041fdd7
mov ecx, dword [ebp - 0xc]
call fcn.0041ff07
push eax
lea ecx, [ebp - 0x38]
call fcn.0041fff7
lea ecx, [ebp - 0x38]
call fcn.0041f06b
cmp dword [ebp - 0x20], ebx
jle 0x415460
mov eax, dword [ebp - 0x1c]
push ebx
cdq
idiv dword [ebp - 0x20]
mov ecx, 0x482d70
push eax
call fcn.00417086
lea ecx, [ebp - 0x44]
call fcn.0041f06b
inc dword [ebp - 0x10]
add dword [ebp - 0x1c], 0x64
mov eax, dword [ebp - 0x10]
cmp eax, dword [0x482978]
jl 0x4150a8
pop edi
pop esi
mov al, 1
pop ebx
leave
ret