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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x888
mov eax, dword [0x604e14]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push eax
call fcn.0048ce80
add esp, 4
mov dword [ebp - 0x85c], eax
cmp dword [ebp - 0x85c], 3
jge 0x4b4946
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b5191
mov dword [ebp - 0x858], 0
mov dword [ebp - 0x850], 0
mov dword [ebp - 0xc], 0
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.0048d2f0
add esp, 8
cmp eax, 4
jne 0x4b4acb
push 0x208
push 0
lea eax, [ebp - 0x630]
push eax
call fcn.00556110
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x630]
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 - 0x630]
push ecx
call fcn.00460cf0
add esp, 0x1c
mov dword [ebp - 0x864], eax
cmp dword [ebp - 0x864], 0xffffffff
jne 0x4b4a17
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b5191
push 0
mov eax, dword [ebp - 0x864]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x868], eax
mov ecx, dword [ebp - 0x868]
push ecx
call fcn.0045ee00
add esp, 4
mov dword [ebp - 0x850], eax
push 0
lea edx, [ebp - 0x860]
push edx
mov eax, dword [ebp - 0x868]
push eax
mov ecx, dword [ebp - 0x850]
push ecx
mov edx, dword [ebp - 0x864]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4b4aa4
push 0x8000
push 0
mov eax, dword [ebp - 0x850]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [ebp - 0x864]
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 0x4b5191
mov eax, dword [ebp - 0x864]
push eax
call fcn.00460e10
add esp, 4
mov dword [ebp - 0x858], 1
mov ecx, dword [ebp - 0x868]
mov dword [ebp - 0xc], ecx
jmp 0x4b4b4b
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.0048d710
add esp, 8
mov dword [ebp - 0x86c], eax
mov eax, dword [ebp - 0x86c]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x78]
push edx
call fcn.0045c640
add esp, 8
mov dword [ebp - 0x424], eax
cmp dword [ebp - 0x424], 0
je 0x4b4b12
mov eax, dword [ebp - 0x424]
movzx ecx, byte [eax + 4]
test ecx, ecx
je 0x4b4b2a
push 0
mov edx, dword [ebp + 8]
push edx
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b5191
mov eax, dword [ebp - 0x424]
mov ecx, dword [eax + 0x20e]
mov dword [ebp - 0x850], ecx
mov edx, dword [ebp - 0x424]
mov eax, dword [edx + 0x212]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
mov dword [ebp - 0x63c], 0
mov dword [ebp - 0x638], 0
push 2
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048d2f0
add esp, 8
cmp eax, 4
jne 0x4b4d11
push 0x208
push 0
lea edx, [ebp - 0x420]
push edx
call fcn.00556110
add esp, 0xc
push 0x104
lea eax, [ebp - 0x420]
push eax
push 0
push 2
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048d7e0
add esp, 0xc
push eax
call fcn.00556680
add esp, 4
push eax
push 0
push 2
mov edx, dword [ebp + 8]
push edx
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 eax, [ebp - 0x420]
push eax
call fcn.00460cf0
add esp, 0x1c
mov dword [ebp - 0x874], eax
cmp dword [ebp - 0x874], 0xffffffff
jne 0x4b4c39
cmp dword [ebp - 0x858], 0
je 0x4b4c21
push 0x8000
push 0
mov ecx, dword [ebp - 0x850]
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 eax, 1
jmp 0x4b5191
push 0
mov eax, dword [ebp - 0x874]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x878], eax
push 4
push 0x1000
mov ecx, dword [ebp - 0x878]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x63c], eax
push 0
lea edx, [ebp - 0x870]
push edx
mov eax, dword [ebp - 0x878]
push eax
mov ecx, dword [ebp - 0x63c]
push ecx
mov edx, dword [ebp - 0x874]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4b4cea
push 0x8000
push 0
mov eax, dword [ebp - 0x63c]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
cmp dword [ebp - 0x858], 0
je 0x4b4cc3
push 0x8000
push 0
mov ecx, dword [ebp - 0x850]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [ebp - 0x874]
push edx
call fcn.00460e10
add esp, 4
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b5191
mov ecx, dword [ebp - 0x874]
push ecx
call fcn.00460e10
add esp, 4
mov dword [ebp - 8], 1
mov edx, dword [ebp - 0x878]
mov dword [ebp - 0x638], edx
jmp 0x4b4da3
push 2
mov eax, dword [ebp + 8]
push eax
call fcn.0048d710
add esp, 8
mov dword [ebp - 0x87c], eax
mov ecx, dword [ebp - 0x87c]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x78]
push eax
call fcn.0045c640
add esp, 8
mov dword [ebp - 0x880], eax
cmp dword [ebp - 0x880], 0
jne 0x4b4d7f
cmp dword [ebp - 0x858], 0
je 0x4b4d67
push 0x8000
push 0
mov ecx, dword [ebp - 0x850]
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 eax, 1
jmp 0x4b5191
mov eax, dword [ebp - 0x880]
mov ecx, dword [eax + 0x20e]
mov dword [ebp - 0x63c], ecx
mov edx, dword [ebp - 0x880]
mov eax, dword [edx + 0x212]
mov dword [ebp - 0x638], eax
mov dword [ebp - 0x84c], 0
xor ecx, ecx
mov word [ebp - 0x428], cx
push 3
mov edx, dword [ebp + 8]
push edx
call fcn.0048d2f0
add esp, 8
cmp eax, 4
jne 0x4b4e2f
push 0x208
push 0
lea eax, [ebp - 0x218]
push eax
call fcn.00556110
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push 0
push 3
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 3
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]
mov dword [ebp - 0x84c], 1
jmp 0x4b4e44
push 3
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048d710
add esp, 8
mov word [ebp - 0x428], ax
cmp dword [ebp - 0x85c], 3
jne 0x4b4ea8
push 0
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x218]
push ecx
movzx edx, word [ebp - 0x428]
push edx
mov eax, dword [ebp - 0x84c]
push eax
mov ecx, dword [ebp - 0x638]
push ecx
mov edx, dword [ebp - 0x63c]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x850]
push ecx
call fcn.004b4660
add esp, 0x3c
mov dword [ebp - 0x850], eax
jmp 0x4b5030
mov dword [ebp - 0x634], 0
xor edx, edx
mov word [ebp - 0x854], dx
push 4
mov eax, dword [ebp + 8]
push eax
call fcn.0048d2f0
add esp, 8
cmp eax, 4
jne 0x4b4f34
push 0x208
push 0
lea ecx, [ebp - 0x848]
push ecx
call fcn.00556110
add esp, 0xc
push 0x104
lea edx, [ebp - 0x848]
push edx
push 0
push 4
mov eax, dword [ebp + 8]
push eax
call fcn.0048d7e0
add esp, 0xc
push eax
call fcn.00556680
add esp, 4
push eax
push 0
push 4
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048d7e0
add esp, 0xc
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x634], 1
jmp 0x4b4f49
push 4
mov edx, dword [ebp + 8]
push edx
call fcn.0048d710
add esp, 8
mov word [ebp - 0x854], ax
cmp dword [ebp - 0x85c], 4
jne 0x4b4fba
push 1
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0xc]
push ecx
push 0x400
lea edx, [ebp - 0x848]
push edx
movzx eax, word [ebp - 0x854]
push eax
mov ecx, dword [ebp - 0x634]
push ecx
push 1
lea edx, [ebp - 0x218]
push edx
movzx eax, word [ebp - 0x428]
push eax
mov ecx, dword [ebp - 0x84c]
push ecx
mov edx, dword [ebp - 0x638]
push edx
mov eax, dword [ebp - 0x63c]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x850]
push edx
call fcn.004b4660
add esp, 0x3c
mov dword [ebp - 0x850], eax
jmp 0x4b5030
push 5
mov eax, dword [ebp + 8]
push eax
call fcn.0048d710
add esp, 8
mov word [ebp - 4], ax
push 0
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0xc]
push edx
movzx eax, word [ebp - 4]
push eax
lea ecx, [ebp - 0x848]
push ecx
movzx edx, word [ebp - 0x854]
push edx
mov eax, dword [ebp - 0x634]
push eax
push 1
lea ecx, [ebp - 0x218]
push ecx
movzx edx, word [ebp - 0x428]
push edx
mov eax, dword [ebp - 0x84c]
push eax
mov ecx, dword [ebp - 0x638]
push ecx
mov edx, dword [ebp - 0x63c]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x850]
push ecx
call fcn.004b4660
add esp, 0x3c
mov dword [ebp - 0x850], eax
cmp dword [ebp - 8], 0
je 0x4b504a
push 0x8000
push 0
mov edx, dword [ebp - 0x63c]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
cmp dword [ebp - 0x850], 0
jne 0x4b506b
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b5191
cmp dword [ebp - 0x858], 0
je 0x4b515d
push 0
push 0
push 2
push 0
push 1
push 0x40000000
lea ecx, [ebp - 0x630]
push ecx
call fcn.00460cf0
add esp, 0x1c
mov dword [ebp - 0x888], eax
cmp dword [ebp - 0x888], 0xffffffff
jne 0x4b50d1
push 0x8000
push 0
mov edx, dword [ebp - 0x850]
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 eax, 1
jmp 0x4b5191
mov dword [ebp - 0x884], 0
push 0
lea ecx, [ebp - 0x884]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x850]
push eax
mov ecx, dword [ebp - 0x888]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4b5138
push 0x8000
push 0
mov edx, dword [ebp - 0x850]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x888]
push eax
call fcn.00460e10
add esp, 4
push 0
mov ecx, dword [ebp + 8]
push ecx
call fcn.0048de20
add esp, 8
mov eax, 1
jmp 0x4b5191
mov edx, dword [ebp - 0x888]
push edx
call fcn.00460e10
add esp, 4
push 0x8000
push 0
mov eax, dword [ebp - 0x850]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4b517e
mov ecx, dword [ebp - 0x424]
mov edx, dword [ebp - 0x850]
mov dword [ecx + 0x20e], edx
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x212], ecx
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.0048de20
add esp, 8
mov eax, 1
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00555ac5
mov esp, ebp
pop ebp
ret