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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e3b31
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x78
push ebx
push esi
push edi
mov eax, dword [0x521e28]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x70], ecx
cmp dword [ebp + 8], 0
jne 0x45bcbc
xor al, al
jmp 0x45c148
mov byte [ebp - 0x11], 0
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 4], 0
push 0
push 0x80
push 4
push 0
push 1
push SysReAllocString
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x45c101
mov dword [ebp - 0x28], 0
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov byte [ebp - 0x1c], 0
xor ecx, ecx
mov word [ebp - 0x1b], cx
mov byte [ebp - 0x19], cl
mov dword [ebp - 0x2c], 0
cmp dword [ebp - 0x24], 0
jl 0x45c082
jg 0x45bd3b
cmp dword [ebp - 0x28], 0
jbe 0x45c082
mov edx, dword [ebp - 0x28]
push edx
call fcn.0048c52d
add esp, 4
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
xor edx, edx
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x48], 0
xor eax, eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
push 0
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea edx, [ebp - 0x3c]
push edx
push 4
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [ebp - 0x1c]
push edx
mov ecx, dword [ebp - 0x70]
call fcn.0045b330
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x7c], ecx
cmp dword [ebp - 0x7c], 1
je 0x45bdec
cmp dword [ebp - 0x7c], 3
je 0x45be71
cmp dword [ebp - 0x7c], 6
je 0x45be31
jmp 0x45beaf
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
push 0
lea edx, [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x45beaf
mov dword [ebp - 0x38], 3
mov dword [ebp - 0x34], 0
push 0
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x45beaf
mov dword [ebp - 0x38], 2
mov dword [ebp - 0x34], 0
push 0
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0xffffffff
cmp dword [ebp - 0x50], 2
je 0x45c067
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x45c067
mov byte [ebp - 0x1c], 0xff
mov byte [ebp - 0x1b], 0xfe
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 2
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.004ae430
add esp, 4
test eax, eax
jbe 0x45c052
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x80], edx
cmp dword [ebp - 0x80], 1
je 0x45bf4a
cmp dword [ebp - 0x80], 6
je 0x45bfb4
jmp 0x45c01f
push 0
mov eax, dword [ebp - 0x58]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x4c]
push ecx
push 8
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048c52d
add esp, 4
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x54]
add edx, 1
push edx
mov eax, dword [ebp - 0x58]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x4c]
push ecx
push 8
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
jmp 0x45c01f
push 0
mov edx, dword [ebp - 0x58]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x4c]
push eax
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x54]
add eax, 1
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0048c52d
add esp, 4
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x54]
push edx
mov eax, dword [ebp - 0x58]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x4c]
push ecx
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
lea edx, [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x54]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x58]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x68]
push ecx
call fcn.0048c532
add esp, 4
mov dword [ebp - 0x58], 0
mov byte [ebp - 0x11], 1
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0xffffffff
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.0048c532
add esp, 4
mov dword [ebp - 0x4c], 0
jmp 0x45c0e4
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
je 0x45c0e4
mov byte [ebp - 0x1c], 0xff
mov byte [ebp - 0x1b], 0xfe
push 0
lea ecx, [ebp - 0x2c]
push ecx
push 2
lea edx, [ebp - 0x1c]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [ebp - 0x11], 1
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0xffffffff
cmp dword [ebp - 0x18], 0
je 0x45c0fa
cmp dword [ebp - 0x18], 0xffffffff
je 0x45c0fa
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0xffffffff
jmp 0x45c121
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x18], 0
je 0x45c13e
cmp dword [ebp - 0x18], 0xffffffff
je 0x45c13e
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x18], 0xffffffff
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8