Function at 0x437130
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 0x4371d2
test edi, edi
je 0x4373a0
push 0x25
push edi
call fcn.004c9bca
add esp, 8
test eax, eax
je 0x4373a0
push edi
call fcn.004c6380
mov edi, eax
add esp, 4
mov dword [ebp - 8], edi
test edi, edi
je 0x4373a0
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
je 0x437387
push 0x30
lea eax, [ebp - 0x3c]
push 0
push eax
mov dword [ebp - 0x40], 0
call fcn.004c9b50
add esp, 0xc
lea ecx, [ebp - 0x40]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
je 0x437200
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp + 0x14]
mov dword [eax], edx
push edi
call fcn.004c62f0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
mov edi, eax
add esp, 4
test edi, edi
je 0x43726a
push str..cmd
push edi
call ebx
test eax, eax
je 0x437239
push str..bat
push edi
call ebx
test eax, eax
je 0x437239
push str..btm
push edi
call ebx
test eax, eax
jne 0x43726a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0xfe
call fcn.004c6070
mov edi, dword [ebp - 8]
movzx edx, al
mov eax, dword [ebp + 0x10]
neg edx
sbb edx, edx
and edx, 0x20
add edx, 0x20
mov dword [eax], edx
mov bl, 1
jmp 0x43738a
push 0
lea ecx, [ebp - 0xc]
push ecx
push 0x40
lea edx, [ebp - 0x80]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x43737d
mov eax, 0x5a4d
cmp word [ebp - 0x80], ax
je 0x4372c3
test edi, edi
je 0x43737d
push str..com
push edi
call ebx
test eax, eax
jne 0x43737d
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [ecx], 0xff
mov dword [edx], 0x10
mov byte [ebp - 1], 1
jmp 0x43737d
mov eax, dword [ebp - 0x44]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
push 0
push 0
push eax
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 0x43737d
push 0
lea ecx, [ebp - 0xc]
push ecx
push 0x108
lea edx, [ebp - 0x188]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x43737d
mov eax, dword [ebp - 0x188]
cmp eax, 0x4550
jne 0x437351
movzx eax, word [ebp - 0x170]
cmp eax, 0x10b
je 0x437340
cmp eax, 0x20b
jne 0x43737d
movzx eax, word [ebp - 0x12c]
mov dword [ebx], eax
mov dword [edi], 0x40
jmp 0x43737d
movzx ecx, word [ebp - 0x12c]
mov dword [ebx], ecx
mov dword [edi], 0x20
jmp 0x43737d
mov edx, 0x454e
cmp ax, dx
jne 0x43737d
mov al, byte [ebp - 0x152]
mov dword [edi], 0x20
cmp al, 2
je 0x437377
cmp al, 4
je 0x437377
mov dword [ebx], 3
jmp 0x43737d
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 0x437397
push edi
call fcn.0044c4f0
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