Function at 0x49ba19
Capabilities:
Get file size
Read file on windows
Terminate process
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x45c
mov eax, dword [0x4ea4ec]
xor eax, esp
mov dword [esp + 0x458], eax
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov cl, byte [edi + 0xeb]
test cl, cl
je 0x49ba4d
mov eax, ebx
jmp 0x49ba50
push 3
pop eax
push ebx
push 0x80
push 3
push ebx
push eax
xor eax, eax
test cl, cl
mov ecx, 0xc0000000
setne al
dec eax
and eax, ecx
add eax, ecx
push eax
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x49babc
cmp byte [edi + 0xeb], bl
je 0x49baa3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4128f8
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.msvcrt.dll_exit]
xor eax, eax
mov ecx, dword [esp + 0x464]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004c4ec0
mov esp, ebp
pop ebp
ret 4
push ebx
lea eax, [esp + 0x10]
push eax
push 0x400
lea eax, [esp + 0x6c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, dword [esp + 0xc]
test eax, eax
je 0x49bf09
cmp ebx, 0x400
jb 0x49bf09
cmp byte [edi + 0xea], 0
je 0x49bcd2
push 0x4129e8
call dword [sym.imp.msvcrt.dll_wprintf]
mov eax, dword [esp + 0x1cc]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1d0]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x34]
pop ecx
push eax
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov eax, dword [esp + 0xd8]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xdc]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx eax, word [esp + 0x4e]
push eax
movzx eax, word [esp + 0x50]
push eax
movzx eax, word [esp + 0x52]
push eax
movzx eax, word [esp + 0x54]
push eax
movzx eax, word [esp + 0x50]
push eax
movzx eax, word [esp + 0x5a]
push eax
movzx eax, word [esp + 0x5a]
push eax
push 0x412a18
call dword [sym.imp.msvcrt.dll_wprintf]
push dword [esp + 0xe8]
push 0x412a7c
call dword [sym.imp.msvcrt.dll_wprintf]
push dword [esp + 0xf4]
push 0x412ab0
call dword [sym.imp.msvcrt.dll_wprintf]
push dword [esp + 0x100]
push 0x412ae4
call dword [sym.imp.msvcrt.dll_wprintf]
movzx eax, word [esp + 0x96]
push eax
movzx eax, word [esp + 0x98]
push eax
movzx eax, word [esp + 0x9a]
push eax
movzx eax, word [esp + 0x9c]
push eax
movzx eax, word [esp + 0x98]
push eax
movzx eax, word [esp + 0xa2]
push eax
movzx eax, word [esp + 0xa2]
push eax
push 0x412b18
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x58
push dword [esp + 0xe0]
push 0x412b74
call dword [sym.imp.msvcrt.dll_wprintf]
push dword [esp + 0xec]
push 0x412ba8
call dword [sym.imp.msvcrt.dll_wprintf]
push dword [esp + 0xfc]
push 0x412bdc
call dword [sym.imp.msvcrt.dll_wprintf]
push dword [esp + 0x120]
lea eax, [esp + 0x128]
push eax
push 0x412c10
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x24
push dword [esp + 0xe8]
push 0x412c54
call dword [sym.imp.msvcrt.dll_wprintf]
mov eax, dword [esp + 0xf0]
pop ecx
pop ecx
test eax, eax
jne 0x49bca1
push 0x412c88
jmp 0x49bcb7
cmp eax, 1
jne 0x49bcad
push 0x412cb0
jmp 0x49bcb7
cmp eax, 2
jne 0x49bcbe
push 0x412ce0
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
push dword [esp + 0xd4]
push 0x412d0c
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
pop ecx
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x49bcf0
push 0x412d48
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
jmp 0x49bd52
push 0
push 0x100000
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call fcn.004c5ac0
mov ebx, eax
test edx, edx
jl 0x49bd52
jg 0x49bd15
cmp ebx, dword [esp + 0xe4]
jbe 0x49bd52
push edx
push ebx
push dword [esp + 0xec]
push 0x412da8
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x10
cmp dword [esp + 0x14], 0
je 0x49bd3f
push 0x412e14
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
cmp byte [edi + 0xeb], 0
je 0x49bd52
lea eax, [ebx + 1]
mov dword [esp + 0xe4], eax
cmp dword [esp + 0xe8], 2
jne 0x49be72
cmp dword [esp + 0xec], 0
jne 0x49be72
push 0x412e50
call dword [sym.imp.msvcrt.dll_wprintf]
cmp byte [edi + 0xeb], 0
pop ecx
je 0x49befa
cmp dword [esp + 0x14], 0
je 0x49bda1
push 0x412ec4
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
push 0xffffffffffffffff
jmp 0x49ba9d
push 0
push dword [esp + 0xcc]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call fcn.004c5ac0
dec eax
push eax
push 0x412ef0
mov dword [esp + 0x24], eax
call dword [sym.imp.msvcrt.dll_wprintf]
push dword [esp + 0xd0]
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49bdef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x412f08
jmp 0x49ba8e
xor eax, eax
push eax
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x49be21
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x412f68
call dword [sym.imp.msvcrt.dll_wprintf]
push ebx
call dword [sym.imp.msvcrt.dll_free]
add esp, 0xc
jmp 0x49ba96
cmp dword [esp + 0x1c], 1
mov dword [esp + 0x18], 1
jl 0x49be72
push 1
push 0
push dword [esp + 0xd0]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x49be9d
push 0
lea eax, [esp + 0x10]
push eax
push dword [esp + 0xd0]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call fcn.0049bf30
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + 0x18], eax
cmp eax, dword [esp + 0x1c]
jle 0x49be30
cmp byte [edi + 0xeb], 0
je 0x49befa
xor ebx, ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x49beae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x412f68
jmp 0x49ba8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x412ff0
jmp 0x49be0c
mov eax, dword [edi + 0x8150]
push ebx
mov dword [esp + 0xf0], eax
lea eax, [esp + 0x10]
push eax
push 0x400
lea eax, [esp + 0x6c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x49bee7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x413078
jmp 0x49ba8e
push dword [edi + 0x8150]
push 0x4130e0
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
jmp 0x49baa5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x400
push ebx
push eax
push 0x412958
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x10
push 0xa0
jmp 0x49ba9d