Function at 0x42fd50
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x188
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
push edi
mov edi, dword [ebp + 8]
push 0
push 0
push 3
push 0
push 1
mov dword [eax], 0
push SysReAllocString
mov dword [ecx], 0
push edi
mov byte [ebp - 1], 0
mov dword [edx], 0xffffffff
mov dword [ebp - 8], 0
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x42fdf2
test edi, edi
je 0x42ffbd
push 0x25
push edi
call fcn.004b03ac
add esp, 8
test eax, eax
je 0x42ffbd
push edi
call fcn.004ad370
mov edi, eax
add esp, 4
mov dword [ebp - 8], edi
test edi, edi
je 0x42ffbd
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x42ffa4
push 0x30
lea eax, [ebp - 0x3c]
push 0
push eax
mov dword [ebp - 0x40], 0
call fcn.004b03e0
add esp, 0xc
lea ecx, [ebp - 0x40]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x42fe20
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp + 0x14]
mov dword [eax], edx
push edi
call fcn.004ad2f0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov edi, eax
add esp, 4
test edi, edi
je 0x42fe87
push str..cmd
push edi
call ebx
test eax, eax
je 0x42fe59
push str..bat
push edi
call ebx
test eax, eax
je 0x42fe59
push str..btm
push edi
call ebx
test eax, eax
jne 0x42fe87
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0xfe
call fcn.004ad0f0
mov edx, dword [ebp + 0x10]
mov edi, dword [ebp - 8]
neg eax
sbb eax, eax
and eax, 0x20
add eax, 0x20
mov dword [edx], eax
mov bl, 1
jmp 0x42ffa7
push 0
lea eax, [ebp - 0xc]
push eax
push 0x40
lea ecx, [ebp - 0x80]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42ff9a
mov edx, 0x5a4d
cmp word [ebp - 0x80], dx
je 0x42fee0
test edi, edi
je 0x42ff9a
push str..com
push edi
call ebx
test eax, eax
jne 0x42ff9a
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov dword [eax], 0xff
mov dword [ecx], 0x10
mov byte [ebp - 1], 1
jmp 0x42ff9a
mov edx, dword [ebp - 0x44]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
push 0
push 0
push edx
mov dword [ebx], 0xff
push esi
mov dword [edi], 0x10
mov byte [ebp - 1], 1
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x42ff9a
push 0
lea eax, [ebp - 0xc]
push eax
push 0x108
lea ecx, [ebp - 0x188]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42ff9a
mov eax, dword [ebp - 0x188]
cmp eax, 0x4550
jne 0x42ff6e
movzx eax, word [ebp - 0x170]
cmp eax, 0x10b
je 0x42ff5d
cmp eax, 0x20b
jne 0x42ff9a
movzx edx, word [ebp - 0x12c]
mov dword [ebx], edx
mov dword [edi], 0x40
jmp 0x42ff9a
movzx eax, word [ebp - 0x12c]
mov dword [ebx], eax
mov dword [edi], 0x20
jmp 0x42ff9a
mov ecx, 0x454e
cmp ax, cx
jne 0x42ff9a
mov al, byte [ebp - 0x152]
mov dword [edi], 0x20
cmp al, 2
je 0x42ff94
cmp al, 4
je 0x42ff94
mov dword [ebx], 3
jmp 0x42ff9a
mov dword [ebx], 2
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 8]
mov bl, byte [ebp - 1]
test edi, edi
je 0x42ffb4
push edi
call fcn.00441300
add esp, 4
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret