Function at 0x4012e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e4a2
mov eax, dword fs:[0]
push eax
sub esp, 0x228
mov eax, dword [0x454004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x22c], esi
mov dword [ebp - 0x230], 0
xor ebx, ebx
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x234], esi
mov dword [esi + 0x10], ebx
jb 0x40133c
mov eax, dword [esi]
jmp 0x40133e
mov eax, esi
xor ecx, ecx
mov word [eax], cx
push 0x104
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], ecx
push eax
push ecx
mov dword [ebp - 0x230], 1
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401572
cmp edi, 0x104
ja 0x401572
push eax
push 0x80
push 3
push eax
push 1
push 0x80000000
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x401572
push 2
push 0
push 0xfffffffffffffffc
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x401557
push 0
lea eax, [ebp - 0x220]
push eax
push 4
lea eax, [ebp - 0x224]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401557
cmp dword [ebp - 0x220], 4
jne 0x401557
mov eax, dword [ebp - 0x224]
cmp al, 0x4d
jne 0x401557
cmp ah, 0x56
jne 0x401557
cmp byte [ebp - 0x222], 0x4b
jne 0x401557
cmp byte [ebp - 0x221], 0x54
jne 0x401557
push 2
push 0
push 0xfffffffffffffff8
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x401557
push 0
lea eax, [ebp - 0x220]
push eax
push 4
lea eax, [ebp - 0x228]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401557
cmp dword [ebp - 0x220], 4
jne 0x401557
mov ecx, dword [ebp - 0x228]
cmp ecx, 0x186a0
ja 0x401557
push 2
push 0
mov eax, 0xfffffff8
sub eax, ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x401557
mov eax, dword [ebp - 0x228]
inc eax
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x401557
push 0
lea eax, [ebp - 0x220]
push eax
push dword [ebp - 0x228]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401557
mov eax, dword [ebp - 0x228]
cmp eax, dword [ebp - 0x220]
jne 0x401557
push 0
push 0
mov byte [eax + ebx], 0
push dword [ebp - 0x228]
push ebx
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push eax
mov ecx, esi
mov dword [ebp - 0x22c], eax
call fcn.00401be0
cmp dword [esi + 0x14], 8
jb 0x401510
mov ecx, dword [esi]
jmp 0x401512
mov ecx, esi
push dword [ebp - 0x22c]
push ecx
push dword [ebp - 0x228]
push ebx
push 8
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x401557
cmp dword [esi + 0x14], 8
jb 0x40153b
mov ecx, dword [esi]
jmp 0x40153d
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401540
sub ecx, edx
sar ecx, 1
push ecx
mov ecx, esi
call fcn.00401be0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x401572
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00402b13
mov esp, ebp
pop ebp
ret