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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10152ea8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x101ac034]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x40], ecx
mov dword [ebp - 4], 0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp + 8]
call fcn.10002bf0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x10012267
mov byte [ebp - 0x24], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10003e00
mov al, byte [ebp - 0x24]
jmp 0x10012440
push 0
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
add ecx, 1
push ecx
call fcn.1014578c
add esp, 4
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x1c], edx
cmp dword [ebp - 0x1c], 0
jne 0x100122b9
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x22], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10003e00
mov al, byte [ebp - 0x22]
jmp 0x10012440
mov ecx, dword [ebp - 0x28]
add ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCR120.dll_memset
add esp, 0xc
mov dword [ebp - 0x18], 0
push 0
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], edx
mov eax, 1
imul ecx, eax, 0x34
mov edx, dword [ebp - 0x2c]
mov dword [edx + ecx], 3
mov dword [ebp - 0x14], 0
push 0x89abcdef
push 0x1ffc
mov eax, 1
shl eax, 2
add eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x40]
call fcn.10012460
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x14]
mov dword [ecx + eax], edx
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
lea ecx, [ebp + 8]
call fcn.10002bf0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jne 0x100123cb
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
cmp dword [ebp - 0x30], 0
jne 0x10012395
mov dword [ebp - 0x3c], 0
jmp 0x100123a2
mov dword [ebp - 0x1c], 0x8123
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0x23], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10003e00
mov al, byte [ebp - 0x23]
jmp 0x10012440
cmp dword [ebp - 0x1c], 0
je 0x100123ea
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0x29c
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
cmp dword [ebp - 0x34], 0
jne 0x10012416
mov dword [ebp - 0x44], 0
jmp 0x10012423
mov dword [ebp - 0x1c], 0x8123
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x21], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.10003e00
mov al, byte [ebp - 0x21]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.101506bb
mov esp, ebp
pop ebp
ret 0x18