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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
xor ebx, ebx
push edi
mov dword [ebp - 0xc], ebx
call fcn.00410024
cmp dword [ebp + 8], ebx
jne 0x40fccd
mov dword [ebp + 8], 0x4330a4
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ebx
mov edi, pe_nt_image_headers32
push edi
push 3
push ebx
push 1
push 0xc0000000
push dword [ebp + 8]
mov dword [0x46c284], ebx
call esi
cmp eax, 0xffffffff
mov dword [0x46c278], eax
jne 0x40fd3d
push ebx
push edi
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call esi
cmp eax, 0xffffffff
mov dword [0x46c278], eax
jne 0x40fd2a
push ebx
push edi
push 3
push ebx
push 3
push 0x80000000
push dword [ebp + 8]
call esi
mov dword [0x46c278], eax
cmp eax, 0xffffffff
mov dword [0x46c284], 1
je 0x40ffbc
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 3
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 8], eax
mov dword [0x46c290], ebx
jl 0x40fda7
push ebx
lea eax, [ebp - 0x10]
push eax
push 3
pop esi
push esi
lea eax, [ebp - 4]
push eax
push dword [0x46c278]
call edi
cmp dword [ebp - 0x10], esi
jne 0x40fd98
push esi
lea eax, [ebp - 4]
push 0x433154
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0xc
test eax, eax
jne 0x40fd98
sub dword [ebp - 8], esi
mov dword [0x46c290], 0xfde9
jmp 0x40fda7
push ebx
push ebx
push ebx
push dword [0x46c278]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 8]
cmp eax, ebx
jle 0x40fe7b
add eax, 2
cmp dword [0x46c290], ebx
push eax
push ebx
push dword [0x46af80]
jne 0x40fe51
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
call esi
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x40fe7b
mov eax, dword [ebp - 8]
lea eax, [eax*4 + 2]
push eax
push ebx
push dword [0x46af80]
call esi
cmp eax, ebx
mov dword [0x46c288], eax
je 0x40fffb
push ebx
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
push dword [ebp + 8]
push dword [0x46c278]
call edi
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 8]
shl eax, 2
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
lea eax, [ebp - 8]
push eax
push dword [0x46c288]
call fcn.00429d20
push dword [ebp + 8]
mov dword [0x46c290], 0xfde9
push ebx
push dword [0x46af80]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40fe7b
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [0x46c288], eax
je 0x40fffb
push ebx
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 8]
push eax
push dword [0x46c278]
call edi
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
mov eax, dword [0x46c288]
cmp eax, ebx
je 0x40fffb
mov ecx, dword [ebp - 8]
mov word [eax + ecx], bx
mov esi, dword [0x46c288]
mov eax, dword [ebp - 8]
add eax, esi
cmp esi, eax
mov dword [0x46c28c], eax
mov edi, 0x46c294
jae 0x40fffb
mov al, byte [esi]
cmp al, 0x20
je 0x40feb6
cmp al, 9
jne 0x40feb9
inc esi
jmp 0x40feac
mov al, byte [esi]
cmp al, 0x3b
jne 0x40fef6
inc esi
cmp byte [esi], 0x20
jne 0x40fec6
inc esi
push esi
push 2
push dword [ebp - 0xc]
push edi
call fcn.0040fc7e
add esp, 0x10
mov dword [ebp - 0xc], eax
jmp 0x40feed
mov al, byte [esi]
cmp al, 0xa
je 0x40ffa1
cmp al, 0xd
je 0x40ffa1
inc esi
cmp byte [esi], bl
jne 0x40feda
jmp 0x40ffa1
cmp al, 0x5b
jne 0x40ff3c
inc esi
push esi
push 1
push dword [ebp - 0xc]
push edi
call fcn.0040fc7e
add esp, 0x10
mov dword [ebp - 0xc], eax
jmp 0x40ff1e
mov al, byte [esi]
cmp al, 0x5d
je 0x40ff27
cmp al, 0xa
je 0x40ff22
cmp al, 0xd
je 0x40ff22
inc esi
cmp byte [esi], bl
jne 0x40ff0f
cmp byte [esi], 0x5d
jne 0x40ffa1
mov byte [esi], bl
jmp 0x40ff33
cmp al, 0xa
je 0x40ffa3
cmp al, 0xd
je 0x40ffa4
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x40ff2b
jmp 0x40ffa4
cmp al, 0xa
je 0x40ffa4
cmp al, 0xd
je 0x40ffa4
mov edx, esi
jmp 0x40ff57
cmp al, 0x3d
je 0x40ff5b
cmp al, 0xd
je 0x40ff5b
cmp al, 0xa
je 0x40ff5b
inc esi
mov al, byte [esi]
cmp al, bl
jne 0x40ff48
lea eax, [esi - 1]
jmp 0x40ff6d
mov cl, byte [eax]
cmp cl, 0x20
je 0x40ff6c
cmp cl, 9
jne 0x40ff71
dec eax
cmp eax, edx
ja 0x40ff60
mov byte [eax + 1], bl
inc esi
mov al, byte [esi]
cmp al, 0x20
je 0x40ff74
cmp al, 9
je 0x40ff74
push esi
push edx
push dword [ebp - 0xc]
push edi
call fcn.0040fc7e
add esp, 0x10
mov dword [ebp - 0xc], eax
jmp 0x40ff9d
mov al, byte [esi]
cmp al, 0xa
je 0x40ffa1
cmp al, 0xd
je 0x40ffa1
inc esi
cmp byte [esi], bl
jne 0x40ff92
mov byte [esi], bl
inc esi
mov al, byte [esi]
cmp al, 0xa
je 0x40ffa3
cmp al, 0xd
je 0x40ffa3
cmp esi, dword [0x46c28c]
jb 0x40feac
jmp 0x40fffb
push dword [ebp + 8]
mov dword [0x46c278], ebx
mov dword [0x46c290], 0xfde9
call sub.MSVCRT.dll_wcslen
pop ecx
lea eax, [eax + eax + 2]
push eax
push ebx
push dword [0x46af80]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
cmp eax, ebx
mov dword [0x46c27c], eax
je 0x40fffb
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_wcscpy
pop ecx
pop ecx
mov eax, dword [0x46c278]
pop edi
pop esi
pop ebx
leave
ret 4