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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x4eb028]
push ebx
push esi
push edi
push 1
push 0
push 0xffffffffffffffff
mov dword [esp + 0x20], ecx
mov ecx, eax
push 0
mov dword [esp + 0x20], eax
call fcn.004a5f40
mov esi, dword [ebp + 8]
or eax, 0xffffffff
mov dword [esp + 0x18], eax
or edx, 0xffffffff
mov eax, dword [0x4e7024]
mov byte [esp + 0xe], 0
mov byte [esp + 0xd], 0
mov dword [esp + 0x20], edx
mov ebx, dword [eax + 0xfc]
and ebx, 0x7fffffff
mov dword [esp + 0x24], ebx
mov edi, esi
nop word [eax + eax]
movzx eax, word [edi]
cmp eax, 0x20
je 0x452e6d
cmp eax, 9
jne 0x452e72
add edi, 2
jmp 0x452e60
cmp eax, 0x2a
jne 0x452ff8
movzx ebx, word [edi + 2]
lea esi, [edi + 2]
test ebx, 0xffffff80
je 0x452e8e
xor ecx, ecx
jmp 0x452e9c
push 2
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
add esp, 8
mov ecx, eax
mov eax, ebx
and eax, 0xffffffdf
test ecx, ecx
cmove eax, ebx
add eax, 0xffffffbd
cmp eax, 0x11
ja case.0x452eb9.68
movzx eax, byte [eax + 0x453480]
jmp dword [eax*4 + 0x45346c]
mov byte [esp + 0xd], 1
jmp case.0x452eb9.68
lea ecx, [edi + 4]
call fcn.00440330
movzx ecx, word [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], edx
test cx, cx
je 0x452f21
mov edi, ecx
nop dword [eax]
nop dword [eax + eax]
mov ecx, 0x4d5384
mov edx, 0x20
nop word [eax + eax]
cmp di, dx
je 0x452f59
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x452f00
movzx eax, word [esi + 2]
add esi, 2
mov edi, eax
test ax, ax
jne 0x452ef0
mov eax, dword [0x4e7024]
mov dword [eax + 0x30], 0x57
test byte [eax + 0x100], 1
jne 0x452fda
mov ecx, dword [0x4e97f8]
push 1
push 0
push 0xffffffffffffffff
push 0x4d4eac
call fcn.004a5f40
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
add esi, 0xfffffffe
jmp case.0x452eb9.68
lea eax, [edi + 4]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
movzx ecx, word [esi]
add esp, 4
mov dword [esp + 0x24], eax
test cx, cx
je 0x452f21
mov edi, ecx
nop dword [eax]
mov eax, 0x4d5384
mov edx, 0x20
nop word [eax + eax]
cmp di, dx
je 0x452f59
movzx ecx, word [eax + 2]
add eax, 2
mov edx, ecx
test cx, cx
jne 0x452f90
movzx eax, word [esi + 2]
add esi, 2
mov edi, eax
test ax, ax
jne 0x452f80
jmp 0x452f21
mov byte [esp + 0xe], 1
cmp word [esi], 0
je 0x452e58
add esi, 2
cmp word [esi], 0
je 0x452e58
add esi, 2
jmp 0x452e58
mov ecx, dword [esp + 0x14]
push 0x4bfb90
push 0
push 0x4d4eac
call fcn.0043e390
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0
push 0x8000000
push 3
push 0
push 3
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x453033
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4e7024]
test byte [ecx + 0x100], 1
mov dword [ecx + 0x30], eax
jmp 0x452f34
lea eax, [esp + 0x2c]
xorps xmm0, xmm0
push eax
push ebx
movq qword [esp + 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp + 0x28], esi
cmp esi, 0xffffffff
jne 0x453063
call edi
test eax, eax
jne 0x453070
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov eax, esi
and eax, ecx
cmp eax, 0xffffffff
jne 0x45308c
call edi
mov ecx, dword [0x4e7024]
push ebx
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4e7024]
jmp 0x452f2d
mov edx, dword [esp + 0x20]
cmp ecx, edx
jb 0x4530a2
mov eax, dword [esp + 0x18]
ja 0x45309e
cmp esi, eax
jbe 0x4530a2
mov esi, eax
mov ecx, edx
test ecx, ecx
jne 0x45344b
cmp esi, 0xfffffffd
ja 0x45344b
mov eax, esi
or eax, ecx
jne 0x4530eb
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4e7024]
mov dword [eax + 0x30], 0
mov ecx, dword [0x4e97f8]
push 1
push 0
push 0xffffffffffffffff
push 0x4bfc14
call fcn.004a5f40
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp byte [esp + 0xd], 0
je 0x4531b5
mov edi, dword [esp + 0x10]
mov al, byte [edi + 0x17]
test al, al
jne 0x453107
mov eax, dword [edi + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
je 0x4531b5
push 0
mov ecx, esi
mov byte [esp + 0x13], 1
shr ecx, 1
mov eax, esi
and eax, 1
push 1
add ecx, eax
push ecx
push 0
mov ecx, edi
call fcn.004a5f40
cmp eax, 1
jne 0x4531e5
push 0
push eax
mov ecx, edi
call fcn.004014f0
mov edi, eax
test edi, edi
je 0x4531e5
push 0
lea eax, [esp + 0x20]
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x4e7024]
push ebx
mov dword [ecx + 0x30], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x4533a1
cmp byte [esp + 0xd], 0
jne 0x45331a
mov ecx, dword [esp + 0x1c]
cmp ecx, 3
jb 0x4531f7
cmp byte [edi], 0xef
jne 0x4531f7
cmp byte [edi + 1], 0xbb
jne 0x4531f7
cmp byte [edi + 2], 0xbf
jne 0x4531f7
lea eax, [ecx - 3]
push 0xfde9
push eax
lea eax, [edi + 3]
push eax
jmp 0x453244
lea eax, [esi + 2]
mov byte [esp + 0xf], 0
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
jne 0x45314a
mov ecx, dword [esp + 0x14]
push 0x4bfb90
push eax
push str.Out_of_memory.
call fcn.0043e770
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp ecx, 2
jb 0x453234
cmp byte [edi], 0xff
jne 0x453234
cmp byte [edi + 1], 0xfe
jne 0x453234
mov dl, 1
test dl, dl
lea eax, [ecx - 2]
push 0
cmove eax, ecx
mov ecx, dword [esp + 0x14]
shr eax, 1
test dl, dl
push 1
push eax
lea eax, [edi + 2]
cmove eax, edi
push eax
call fcn.004a5f40
neg eax
sbb eax, eax
and eax, esi
mov ebx, eax
jmp 0x453259
mov eax, dword [esp + 0x24]
xor dl, dl
cmp eax, 0x4b0
je 0x453209
push eax
push ecx
push edi
mov ecx, dword [esp + 0x1c]
call fcn.004a6b20
test eax, eax
jne 0x453255
xor ebx, ebx
jmp 0x453259
mov ebx, dword [esp + 0x18]
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov ecx, dword [esp + 0x14]
add esp, 4
push 0
push 1
call fcn.004014f0
cmp byte [esp + 0xe], 0
mov edi, eax
je 0x4533ef
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x17], 0
jne 0x45328c
mov esi, dword [eax + 0xc]
jmp 0x45328e
mov esi, eax
cmp byte [esi + 0x17], 1
jne 0x4532a6
test byte [esi + 0x15], 8
je 0x4532a1
mov ecx, esi
call fcn.00401350
lea eax, [esi + 0xc]
jmp 0x4532ab
mov eax, 0x4ed8fc
mov eax, dword [eax]
mov edx, 0x4dc0fc
shr eax, 1
mov ecx, edi
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 1
push 0x4dcc34
call fcn.004a21b0
mov edi, dword [esp + 0x28]
add esp, 0x18
cmp byte [edi + 0x17], 0
jne 0x4532e3
mov esi, dword [edi + 0xc]
jmp 0x4532e5
mov esi, edi
cmp byte [esi + 0x17], 1
jne 0x453308
test byte [esi + 0x15], 8
je 0x4532f8
mov ecx, esi
call fcn.00401350
mov eax, dword [esp + 0x24]
add esi, 0xc
add eax, eax
mov dword [esi], eax
jmp 0x4533f3
mov eax, dword [esp + 0x24]
mov esi, 0x4ed8fc
add eax, eax
mov dword [esi], eax
jmp 0x4533f3
mov ecx, dword [esp + 0x10]
mov al, byte [ecx + 0x17]
test al, al
jne 0x45332b
mov eax, dword [ecx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 2
jne 0x453354
mov edx, dword [esp + 0x1c]
mov ecx, edi
call fcn.004a5d70
push edi
mov esi, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
cmp esi, 1
jne 0x45341a
jmp 0x4530cc
mov ebx, dword [esp + 0x1c]
test bl, 1
je 0x453362
mov byte [ebx + edi], 0
inc ebx
xor eax, eax
mov word [ebx + edi], ax
mov edi, ecx
cmp byte [edi + 0x17], al
jne 0x453374
mov esi, dword [edi + 0xc]
jmp 0x453376
mov esi, edi
cmp byte [esi + 0x17], 1
jne 0x453394
test byte [esi + 0x15], 8
je 0x453389
mov ecx, esi
call fcn.00401350
add esi, 0xc
mov dword [esi], ebx
mov ebx, dword [esp + 0x18]
jmp 0x4533f3
mov esi, 0x4ed8fc
mov dword [esi], ebx
mov ebx, dword [esp + 0x18]
jmp 0x4533f3
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x10]
cmp byte [eax + 0x17], 0
jne 0x4533b5
mov esi, dword [eax + 0xc]
jmp 0x4533b7
mov esi, eax
cmp byte [esi + 0x17], 1
jne 0x4533cf
test byte [esi + 0x15], 8
je 0x4533ca
mov ecx, esi
call fcn.00401350
add esi, 0xc
jmp 0x4533d4
mov esi, 0x4ed8fc
cmp byte [esp + 0xf], 0
mov dword [esi], 0
jne 0x4533eb
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
cmp byte [edi + 0x17], 0
jne 0x4533fc
mov edi, dword [edi + 0xc]
cmp byte [edi + 0x17], 2
jne 0x453425
cmp dword [0x4ec4f4], 0
je 0x453425
push ecx
mov ecx, 0x4ec4e8
call fcn.00405c10
test eax, eax
jne 0x453439
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov al, byte [edi + 0x15]
and al, 0x86
cmp byte [esp + 0xd], 0
mov byte [edi + 0x15], al
je 0x453439
or al, 1
mov byte [edi + 0x15], al
test ebx, ebx
jne 0x4530cc
mov eax, dword [0x4e7024]
jmp 0x452f2d
mov ecx, dword [esp + 0x14]
push 0x4bfb90
push 0
push str.Out_of_memory.
call fcn.0043e770
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4