Function at 0x454150
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52809b
mov eax, dword fs:[0]
push eax
sub esp, 0x2d8
mov eax, dword [0x581980]
xor eax, esp
mov dword [esp + 0x2d0], eax
push ebx
push esi
push edi
mov eax, dword [0x581980]
xor eax, esp
push eax
lea eax, [esp + 0x2e8]
mov dword fs:[0], eax
mov ebx, ecx
xor ecx, ecx
mov word [esp + 0x28], cx
mov ecx, dword [0x583040]
lea eax, [esp + 0x28]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], eax
mov edi, ecx
test ecx, ecx
jne 0x4541b6
mov edi, 0x5641f8
mov ecx, edi
lea esi, [ecx + 2]
jmp 0x4541c0
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x4541c0
sub ecx, esi
sar ecx, 1
mov esi, ecx
cmp esi, 0x3f
jl 0x4541f1
lea edx, [esi + esi + 2]
push edx
push 0
mov dword [esp + 0x2c], 0
call fcn.004f3457
add esp, 8
mov dword [esp + 0x24], eax
push esi
push edi
push eax
call fcn.004f3504
mov ecx, dword [esp + 0x30]
xor eax, eax
add esp, 0xc
mov word [ecx + esi*2], ax
mov dword [esp + 0x2f0], eax
mov eax, dword [0x5830c8]
cmp word [eax], 0
jne 0x4542f6
test ebx, ebx
je 0x45422a
push ebx
lea ebx, [esp + 0x28]
call fcn.0040a790
mov edx, dword [esp + 0x24]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
or esi, 0xffffffff
cmp edi, esi
jne 0x454275
mov dword [esp + 0x2f0], esi
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x28]
cmp eax, ecx
je 0x4545d4
push eax
call fcn.004f3161
add esp, 4
jmp 0x4545d4
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
jne 0x4542a9
mov dword [esp + 0x2f0], esi
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
je 0x4545d4
push eax
call fcn.004f3161
add esp, 4
jmp 0x4545d4
push ebx
mov dword [esp + 0x18], 0
call fcn.004f1ede
add esp, 4
push 0
mov esi, eax
lea eax, [esp + 0x18]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x14], ebx
je 0x4545b0
push esi
call fcn.004f391e
add esp, 4
mov dword [esp + 0x2f0], 0xffffffff
jmp 0x454257
push eax
lea ebx, [esp + 0x28]
call fcn.0040a790
cmp byte [0x5875c1], 0
je 0x454318
mov edi, dword [0x5875fc]
mov dword [esp + 0x14], edi
jmp 0x454440
mov ebx, dword [esp + 0x24]
push 0x340
call fcn.004f294c
add esp, 4
test eax, eax
je 0x454343
or ecx, 0xffffffff
mov dword [eax], 0
mov dword [eax + 4], ecx
mov dword [eax + 0x134], ecx
mov esi, eax
jmp 0x454345
xor esi, esi
cmp dword [esi], 0
jne 0x45440e
cmp dword [esi + 4], 0xffffffff
jne 0x45440e
lea edi, [esi + 0x138]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add edi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x454370
mov edx, dword [0x568408]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ebx
mov dword [edi], edx
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x454407
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
push 0x1c
sete bl
call fcn.004f294c
mov edi, eax
mov byte [edi], 1
mov byte [edi + 1], bl
mov eax, dword [esp + 0x18]
add esp, 4
mov dword [edi + 4], eax
mov byte [edi + 8], 0
mov dword [edi + 0xc], 0
test bl, bl
je 0x4543f7
mov ecx, dword [esp + 0x14]
push 1
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [edi + 0xc], eax
mov eax, edi
call fcn.0041ec00
mov dword [esi], eax
mov eax, dword [0x587628]
jmp 0x454413
mov eax, 0x200
jmp 0x454413
mov eax, 0x1000000
mov dword [0x58762c], eax
test eax, eax
je 0x454427
push esi
call fcn.004f287e
add esp, 4
jmp 0x454444
push 8
call fcn.004f294c
add esp, 4
mov dword [eax], 1
mov dword [eax + 4], esi
mov dword [esp + 0x14], eax
mov edi, eax
test edi, edi
jne 0x45445e
mov dword [esp + 0x2f0], 0xffffffff
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x28]
cmp eax, edx
jmp 0x454261
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xac]
push eax
push edi
lea edx, [esp + 0x24]
call fcn.004204d0
add esp, 8
test eax, eax
je 0x45448b
mov dword [esp + 0x2f0], 0xffffffff
jmp 0x454257
mov ebx, dword [esp + 0x2d8]
test ebx, ebx
je 0x454444
push ebx
call fcn.004f1ede
add esp, 4
cmp dword [edi], 1
mov esi, eax
je 0x4544b2
mov dword [0x58762c], 0x80000
jmp 0x4544d1
mov eax, dword [esp + 0x1c]
mov ecx, dword [edi + 4]
push ebx
push esi
push eax
call fcn.004202c0
mov dword [0x58762c], eax
test eax, eax
je 0x4544f8
cmp eax, 0x600
je 0x4544f8
push esi
call fcn.004f391e
add esp, 4
cmp byte [0x5875c1], 0
jne 0x4544e8
call fcn.00420630
mov dword [esp + 0x2f0], 0xffffffff
jmp 0x454257
cmp byte [0x5875c1], 0
jne 0x4545b0
cmp dword [edi], 1
je 0x454519
mov dword [0x58762c], 0x80000
jmp 0x4545b0
mov edi, dword [edi + 4]
cmp dword [edi + 4], 0xffffffff
mov dword [esp + 0x20], edi
je 0x454531
mov edi, dword [edi]
call fcn.0041fa70
mov edi, dword [esp + 0x20]
mov eax, dword [edi]
mov dword [edi + 4], 0xffffffff
mov dword [esp + 0x1c], eax
test eax, eax
je 0x45458a
cmp dword [eax + 0x7c], 0
je 0x454557
mov edi, eax
call fcn.0041fa70
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov dword [esp + 0x20], ecx
test ecx, ecx
je 0x454581
cmp byte [ecx], 0
je 0x454574
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004f287e
mov eax, dword [esp + 0x20]
add esp, 4
push eax
call fcn.004f3161
add esp, 4
push edi
mov dword [edi], 0
mov dword [0x58762c], 0
call fcn.004f287e
mov eax, dword [esp + 0x18]
add esp, 4
push eax
call fcn.004f287e
add esp, 4
mov dword [esp + 0x2f0], 0xffffffff
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x28]
cmp eax, ecx
je 0x4545d0
push eax
call fcn.004f3161
add esp, 4
test esi, esi
jne 0x45464c
mov edx, dword [esp + 0x18]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x454648
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x454648
push ebx
mov dword [esp + 0x1c], 0
call fcn.004f1ede
add esp, 4
push 0
mov esi, eax
lea eax, [esp + 0x1c]
push eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x18], ebx
je 0x454644
push esi
call fcn.004f391e
add esp, 4
xor eax, eax
jmp 0x454661
test esi, esi
jne 0x45464c
xor eax, eax
jmp 0x454661
push esi
mov eax, ebx
call fcn.00454690
push esi
mov edi, eax
call fcn.004f287e
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x2e8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2d0]
xor ecx, esp
call fcn.004f2889
mov esp, ebp
pop ebp
ret