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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58349e
mov eax, dword fs:[0]
push eax
sub esp, 0x2b8
mov eax, dword [0x604e14]
xor eax, ebp
mov dword [ebp - 0x18], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push eax
call fcn.0048ce80
add esp, 4
mov dword [ebp - 0x298], eax
cmp dword [ebp - 0x298], 2
jge 0x4b7b4e
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b803a
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x290], 0
mov dword [ebp - 0x10], 0
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.0048d2f0
add esp, 8
cmp eax, 4
jne 0x4b7cd0
push 0x208
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.00556110
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x224]
push ecx
push 0
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.0048d7e0
add esp, 0xc
push eax
call fcn.00556680
add esp, 4
push eax
push 0
push 1
mov eax, dword [ebp + 8]
push eax
call fcn.0048d7e0
add esp, 0xc
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x224]
push ecx
call fcn.00460cf0
add esp, 0x1c
mov dword [ebp - 0x2a0], eax
cmp dword [ebp - 0x2a0], 0xffffffff
jne 0x4b7c1f
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b803a
push 0
mov eax, dword [ebp - 0x2a0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x2a4], eax
mov ecx, dword [ebp - 0x2a4]
push ecx
call fcn.0045ee00
add esp, 4
mov dword [ebp - 0x290], eax
push 0
lea edx, [ebp - 0x29c]
push edx
mov eax, dword [ebp - 0x2a4]
push eax
mov ecx, dword [ebp - 0x290]
push ecx
mov edx, dword [ebp - 0x2a0]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4b7cac
push 0x8000
push 0
mov eax, dword [ebp - 0x290]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [ebp - 0x2a0]
push ecx
call fcn.00460e10
add esp, 4
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b803a
mov eax, dword [ebp - 0x2a0]
push eax
call fcn.00460e10
add esp, 4
mov dword [ebp - 0x294], 1
mov ecx, dword [ebp - 0x2a4]
mov dword [ebp - 0x10], ecx
jmp 0x4b7d41
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.0048d710
add esp, 8
mov dword [ebp - 0x2a8], eax
mov eax, dword [ebp - 0x2a8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x78]
push edx
call fcn.0045c640
add esp, 8
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4b7d0e
mov eax, dword [ebp - 0x14]
movzx ecx, byte [eax + 4]
test ecx, ecx
je 0x4b7d26
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b803a
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + 0x20e]
mov dword [ebp - 0x290], ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x212]
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x28c]
call fcn.00461040
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x290]
push edx
lea ecx, [ebp - 0x28c]
call fcn.00461100
test eax, eax
jne 0x4b7dbf
cmp dword [ebp - 0x294], 0
je 0x4b7d8a
push 0x8000
push 0
mov eax, dword [ebp - 0x290]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048de20
add esp, 8
mov dword [ebp - 0x2b4], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28c]
call fcn.004610a0
mov eax, dword [ebp - 0x2b4]
jmp 0x4b803a
xor edx, edx
mov word [ebp - 0x22c], dx
push 2
mov eax, dword [ebp + 8]
push eax
call fcn.0048d2f0
add esp, 8
cmp eax, 3
jne 0x4b7df2
push 2
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048d710
add esp, 8
mov word [ebp - 0x22c], ax
jmp 0x4b7e44
cmp dword [ebp - 0x294], 0
je 0x4b7e0f
push 0x8000
push 0
mov edx, dword [ebp - 0x290]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0048de20
add esp, 8
mov dword [ebp - 0x2b8], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28c]
call fcn.004610a0
mov eax, dword [ebp - 0x2b8]
jmp 0x4b803a
mov dword [ebp - 0x228], 0
cmp dword [ebp + 0xc], 0
jne 0x4b7e6f
movzx ecx, word [ebp - 0x22c]
push ecx
lea ecx, [ebp - 0x28c]
call fcn.00464ab0
mov dword [ebp - 0x228], eax
jmp 0x4b7e88
movzx edx, word [ebp - 0x22c]
push edx
lea ecx, [ebp - 0x28c]
call fcn.00464950
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x294], 0
je 0x4b7fe2
cmp dword [ebp - 0x228], 0
je 0x4b7fc3
cmp dword [ebp - 0x288], 0
je 0x4b7fc3
push 0
push 0
push 2
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x224]
push eax
call fcn.00460cf0
add esp, 0x1c
mov dword [ebp - 0x2b0], eax
cmp dword [ebp - 0x2b0], 0xffffffff
jne 0x4b7f25
push 0x8000
push 0
mov ecx, dword [ebp - 0x288]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0048de20
add esp, 8
mov dword [ebp - 0x2bc], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28c]
call fcn.004610a0
mov eax, dword [ebp - 0x2bc]
jmp 0x4b803a
mov dword [ebp - 0x2ac], 0
push 0
lea eax, [ebp - 0x2ac]
push eax
lea ecx, [ebp - 0x28c]
call fcn.0045bce0
push eax
mov ecx, dword [ebp - 0x288]
push ecx
mov edx, dword [ebp - 0x2b0]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4b7fb4
push 0x8000
push 0
mov eax, dword [ebp - 0x288]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [ebp - 0x2b0]
push ecx
call fcn.00460e10
add esp, 4
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0048de20
add esp, 8
mov dword [ebp - 0x2c0], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28c]
call fcn.004610a0
mov eax, dword [ebp - 0x2c0]
jmp 0x4b803a
mov eax, dword [ebp - 0x2b0]
push eax
call fcn.00460e10
add esp, 4
cmp dword [ebp - 0x288], 0
je 0x4b7fe0
push 0x8000
push 0
mov ecx, dword [ebp - 0x288]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4b8005
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x288]
mov dword [edx + 0x20e], eax
lea ecx, [ebp - 0x28c]
call fcn.0045bce0
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x212], eax
mov edx, dword [ebp - 0x228]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0048de20
add esp, 8
mov dword [ebp - 0x2c4], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28c]
call fcn.004610a0
mov eax, dword [ebp - 0x2c4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00555ac5
mov esp, ebp
pop ebp
ret