Function at 0x45352f
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
mov eax, 0x524448
call fcn.0051f0b4
sub esp, 0x14c
push ebx
push esi
push edi
push 0x56f16c
lea ecx, [ebp - 0x18]
call fcn.00402946
xor ebx, ebx
push 0x5440d0
mov dword [ebp - 4], ebx
call fcn.00411fcf
push eax
lea eax, [ebp - 0x18]
push str._s_s
push eax
call fcn.004142e8
mov esi, dword [ebp - 0x18]
add esp, 0x10
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x453888
push ebx
push 0x80
push 3
push ebx
push ebx
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x10], edi
cmp edi, 0xffffffff
je 0x453888
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 4
push 0x1000
push 4
push ebx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebx
mov esi, eax
lea eax, [ebp - 0x1c]
push eax
push 4
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4535e8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
jmp 0x45388b
cmp dword [ebp - 0x1c], 4
jne 0x4535d6
lea edi, [ebp - 0x20]
movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x20]
push 4
pop esi
add eax, esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x28], eax
cmp eax, esi
jbe 0x453743
push ebx
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x14], eax
jne 0x45378f
push 8
pop ecx
push esi
push 0x1000
xor eax, eax
mov byte [ebp - 0x54], bl
lea edi, [ebp - 0x53]
push 0x21
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebx
call edi
push ebx
lea ecx, [ebp - 0x1c]
push ecx
push 0x21
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45378f
cmp dword [ebp - 0x1c], 0x21
jne 0x45378f
push 0x21
push dword [ebp - 0x30]
lea eax, [ebp - 0x54]
push eax
call fcn.004eff60
add esp, 0xc
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00431b83
mov byte [ebp - 4], 1
push dword [ebp - 0x20]
lea ecx, [ebp - 0x158]
call fcn.00449d4d
mov byte [ebp - 4], 2
push dword [eax]
lea ecx, [ebp - 0x24]
call fcn.00401f01
lea eax, [ebp - 0x154]
mov byte [ebp - 4], 4
cmp dword [ebp - 0x158], eax
je 0x4536bf
push dword [ebp - 0x158]
call fcn.004ea208
pop ecx
add dword [ebp - 0x14], 0x21
push ebx
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x14], eax
jne 0x453797
push esi
push 0x1000
push esi
push ebx
call edi
push ebx
mov edi, eax
lea eax, [ebp - 0x1c]
push eax
push esi
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x453797
cmp dword [ebp - 0x1c], esi
jne 0x453797
mov edi, dword [edi]
add dword [ebp - 0x14], esi
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp + 8]
add eax, 4
push eax
call fcn.00453a7c
mov dword [eax], edi
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.0040297c
mov byte [ebp - 4], bl
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040297c
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x28]
jb 0x453608
push ebx
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x14], eax
jne 0x45378f
push esi
mov edi, 0x1000
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebx
lea ecx, [ebp - 0x1c]
push ecx
push esi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45378f
cmp dword [ebp - 0x1c], esi
jne 0x45378f
add dword [ebp - 0x14], esi
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x2c]
jae 0x45386f
jmp 0x4537c5
push dword [ebp - 0x10]
jmp 0x4535d7
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040297c
jmp 0x4535dd
push 4
xor ebx, ebx
pop esi
mov edi, 0x1000
push ebx
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x14], eax
jne 0x45378f
push esi
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebx
lea ecx, [ebp - 0x1c]
push ecx
push esi
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45378f
cmp dword [ebp - 0x1c], esi
jne 0x45378f
add dword [ebp - 0x14], esi
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
push ebx
push ebx
push dword [ebp - 0x14]
mov dword [ebp - 0x28], eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x14], eax
jne 0x45378f
push esi
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebx
mov edi, eax
lea eax, [ebp - 0x1c]
push eax
push esi
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45378f
cmp dword [ebp - 0x1c], esi
jne 0x45378f
mov ebx, dword [ebp + 8]
mov edi, dword [edi]
add dword [ebp - 0x14], esi
lea eax, [ebp - 0x28]
push eax
add ebx, 0x24
call fcn.00449ca8
mov dword [eax], edi
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x2c]
jb 0x4537bb
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.0040297c
xor eax, eax
inc eax
jmp 0x453892
lea ecx, [esi - 0x10]
call fcn.0040297c
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4