Function at 0x452157
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0x168
mov eax, 0x48b74e
call fcn.00485437
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x170], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x144], ebx
mov dword [ebp - 0x140], ebx
mov dword [ebp - 0x13c], ebx
mov byte [ebp - 0x138], 1
push ebx
push 0x80
push 3
pop ecx
push ecx
push ebx
push 1
mov dword [ebp - 4], ebx
push SysReAllocString
push eax
mov dword [ebp - 0x150], ebx
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x168], ebx
mov byte [ebp - 4], 1
mov dword [ebp - 0x160], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x164], esi
cmp esi, 0xffffffff
jne 0x45220b
mov ecx, dword [ebp - 0x144]
mov edi, dword [ebp - 0x140]
mov esi, ecx
mov eax, edi
dec edi
test eax, eax
je 0x4521fd
call fcn.00452d51
mov ecx, dword [ebp - 0x144]
add esi, 0x20
jmp 0x4521e6
test ecx, ecx
je 0x45254c
push ecx
jmp 0x452545
lea eax, [ebp - 0x150]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x452512
cmp dword [ebp - 0x14c], 0
jne 0x452512
mov eax, dword [ebp - 0x150]
xor ecx, ecx
push 2
shr eax, 1
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00485975
mov edi, eax
pop ecx
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x174], edi
push ebx
lea eax, [ebp - 0x168]
push eax
mov byte [ebp - 4], 2
push dword [ebp - 0x150]
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4524a5
mov eax, dword [ebp - 0x168]
cmp eax, dword [ebp - 0x150]
jne 0x4524a5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x150]
or dword [ebp - 0x164], 0xffffffff
mov esi, eax
mov dword [ebp - 0x15c], esi
mov edx, ebx
mov dword [ebp - 0x158], ebx
mov ecx, ebx
mov dword [ebp - 0x148], ebx
cmp ecx, esi
jae 0x45230d
lea esi, [ecx + edi]
mov eax, edx
xor edx, edx
push 0xc
pop ecx
div ecx
mov eax, dword [ebp - 0x158]
mov ecx, edx
xor edx, edx
div dword [ebp - 0x160]
mov al, byte [ecx + 0x41139c]
mov ecx, edx
mov edx, dword [ebp - 0x158]
shl al, cl
mov ecx, dword [ebp - 0x148]
xor byte [esi], al
mov eax, dword [ebp - 0x150]
mov esi, dword [ebp - 0x15c]
inc edx
inc ecx
mov dword [ebp - 0x158], edx
mov dword [ebp - 0x148], ecx
jmp 0x4522b9
shr eax, 1
push eax
push edi
lea eax, [ebp - 0x144]
push eax
call fcn.0046546b
cmp dword [ebp - 0x140], 1
je 0x452357
push edi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
mov edi, dword [ebp - 0x140]
pop ecx
mov ecx, dword [ebp - 0x144]
mov esi, ecx
mov eax, edi
dec edi
test eax, eax
je 0x4521fd
call fcn.00452d51
mov ecx, dword [ebp - 0x144]
add esi, 0x20
jmp 0x45233c
xor eax, eax
lea ecx, [ebp - 0x144]
call fcn.00465abd
mov esi, dword [ebp - 0x154]
mov ecx, dword [esi + 0x43c]
mov edx, dword [ecx]
mov dword [ebp - 0x160], eax
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x15c], eax
call dword [edx + 0x3c]
mov byte [eax + 0x24d], 1
mov eax, ebx
mov dword [ebp - 0x148], ebx
cmp eax, dword [ebp - 0x15c]
jae 0x45245d
mov ecx, eax
mov eax, dword [ebp - 0x160]
call fcn.00465432
cmp dword [eax + 0x14], ebx
ja 0x4523b8
call fcn.00446d3e
jmp 0x4523bb
mov eax, dword [eax + 0x10]
push 0x10
lea ecx, [ebp - 0x34]
push ecx
push 0x80
lea ecx, [ebp - 0x134]
push ecx
push 0x4123d0
push eax
call dword [sym.imp.msvcrt.dll_swscanf_s]
mov ecx, dword [esi + 0x43c]
add esp, 0x18
cmp eax, 2
je 0x452423
mov eax, dword [ecx]
call dword [eax + 0x3c]
push edi
mov byte [eax + 0x24d], bl
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
mov edi, dword [ebp - 0x140]
pop ecx
mov ecx, dword [ebp - 0x144]
mov esi, ecx
mov eax, edi
dec edi
test eax, eax
je 0x4521fd
call fcn.00452d51
mov ecx, dword [ebp - 0x144]
add esi, 0x20
jmp 0x452408
mov edi, dword [ecx + 0x1c]
lea eax, [ebp - 0x134]
push eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x154], ecx
call fcn.0044b00c
mov eax, dword [ebp - 0x154]
mov edi, dword [ebp - 0x16c]
mov byte [eax + 0x20], 1
mov eax, dword [ebp - 0x148]
inc eax
mov dword [ebp - 0x148], eax
jmp 0x452393
mov ecx, dword [esi + 0x43c]
mov eax, dword [ecx]
call dword [eax + 0x3c]
push edi
mov byte [eax + 0x24d], bl
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
mov edi, dword [ebp - 0x140]
mov esi, dword [ebp - 0x144]
pop ecx
test edi, edi
je 0x452497
call fcn.00452d51
add esi, 0x20
dec edi
jne 0x452486
mov esi, dword [ebp - 0x144]
test esi, esi
je 0x45254c
push esi
jmp 0x452545
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
mov edi, dword [ebp - 0x140]
pop ecx
mov ecx, dword [ebp - 0x144]
mov esi, ecx
mov eax, edi
dec edi
test eax, eax
je 0x4521fd
call fcn.00452d51
mov ecx, dword [ebp - 0x144]
add esi, 0x20
jmp 0x4524c2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x140]
mov esi, dword [ebp - 0x144]
mov eax, edi
dec edi
test eax, eax
je 0x452536
call fcn.00452d51
add esi, 0x20
jmp 0x452525
cmp dword [ebp - 0x144], 0
je 0x45254c
push dword [ebp - 0x144]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
call fcn.004854a2
ret 8