Function at 0x429020
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov ebp, edx
mov dword [esp + 0x10], ecx
xor esi, esi
push edi
test ebp, ebp
je 0x429038
cmp ebp, 0x40
jb 0x429056
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x42941b
test ebp, ebp
je 0x429068
mov eax, dword [ecx + 0x3c]
add eax, 0xf8
cmp ebp, eax
jae 0x429068
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov edx, dword [ecx + 0x3c]
add edx, ecx
mov dword [esp + 0x18], edx
cmp dword [edx], 0x4550
jne 0x42941b
mov eax, 0x14c
cmp word [edx + 4], ax
jne 0x42941b
mov ebx, dword [edx + 0x38]
test bl, 1
jne 0x42941b
movzx ecx, word [edx + 0x14]
movzx edi, word [edx + 6]
add ecx, 0x24
test edi, edi
je 0x4290d3
add ecx, edx
nop dword [eax]
mov eax, dword [ecx + 4]
mov edx, dword [ecx]
test eax, eax
jne 0x4290be
lea eax, [edx + ebx]
jmp 0x4290c0
add eax, edx
cmp eax, esi
cmovbe eax, esi
add ecx, 0x28
mov esi, eax
sub edi, 1
jne 0x4290b0
mov edx, dword [esp + 0x18]
mov edi, dword [edx + 0x50]
lea ecx, [ebx - 1]
dec edi
lea eax, [ebx - 1]
not ecx
add edi, ebx
add eax, esi
and edi, ecx
and eax, ecx
cmp edi, eax
jne 0x42941b
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x3000
push edi
push dword [edx + 0x34]
call esi
mov dword [esp + 0x10], eax
test eax, eax
jne 0x429131
push 4
push 0x3000
push edi
push eax
call esi
mov edi, eax
mov dword [esp + 0x10], edi
test edi, edi
jne 0x429135
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov edi, dword [esp + 0x10]
push 0x44
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
mov dword [esp + 0x20], ebx
test ebx, ebx
jne 0x42916f
push 0x8000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push 0
push 4
push 8
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [ebx + 0xc], eax
mov dword [ebx], edi
mov edi, dword [esp + 0x18]
movzx eax, word [edi + 0x16]
shr eax, 0xd
and eax, 1
mov dword [ebx + 0x20], 0x428fb0
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x28], eax
mov eax, dword [esp + 0x38]
mov dword [ebx + 0x2c], eax
mov eax, dword [esp + 0x3c]
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0x40]
mov dword [ebx + 0x24], 0x428fd0
mov dword [ebx + 0x38], eax
mov eax, dword [edi + 0x38]
mov dword [ebx + 0x40], eax
test ebp, ebp
je 0x4291e3
cmp ebp, dword [edi + 0x54]
jae 0x4291e3
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, ebx
call fcn.004295a0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push 4
push 0x1000
push dword [edi + 0x54]
push dword [esp + 0x1c]
call esi
push dword [edi + 0x54]
mov esi, eax
push dword [esp + 0x18]
push esi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x20]
add esp, 0xc
mov ecx, dword [esp + 0x10]
mov edx, ebp
mov eax, dword [eax + 0x3c]
add eax, esi
mov dword [ebx + 4], eax
push ebx
push edi
mov dword [eax + 0x34], ecx
mov ecx, dword [esp + 0x1c]
call fcn.00428930
add esp, 8
test eax, eax
je 0x4291d2
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 0x34]
sub eax, dword [edi + 0x34]
mov dword [esp + 0x1c], eax
je 0x4292da
cmp dword [ecx + 0xa4], 0
jne 0x42924f
xor eax, eax
jmp 0x4292df
mov edx, dword [ebx]
mov ecx, dword [ecx + 0xa0]
add ecx, edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x14], ecx
mov eax, dword [ecx]
test eax, eax
je 0x4292da
lea ebp, [eax + edx]
xor esi, esi
mov eax, dword [ecx + 4]
lea edi, [ecx + 4]
sub eax, 8
lea edx, [ecx + 8]
test eax, 0xfffffffe
jbe 0x4292b1
mov ebx, dword [esp + 0x1c]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x42929e
and eax, 0xfff
add dword [eax + ebp], ebx
mov eax, dword [edi]
inc esi
sub eax, 8
add edx, 2
shr eax, 1
cmp esi, eax
jb 0x429283
mov ebx, dword [esp + 0x20]
push dword [ebx + 0x40]
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov ecx, dword [esp + 0x14]
add ecx, dword [edi]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x14], ecx
mov eax, dword [ecx]
test eax, eax
jne 0x429267
mov edi, dword [esp + 0x18]
mov eax, 1
mov ecx, ebx
mov dword [ebx + 0x1c], eax
call fcn.00428c90
test eax, eax
je 0x4291d2
mov ecx, ebx
call fcn.00428b10
test eax, eax
je 0x4291d2
mov eax, dword [0x4fba50]
xor ecx, ecx
cdq
cmp dword [edi + 0x34], eax
jne 0x429311
cmp ecx, edx
je 0x429341
mov eax, dword [ebx + 4]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x429341
mov edi, dword [ebx]
mov esi, dword [esi + edi + 0xc]
test esi, esi
je 0x429341
mov eax, dword [esi]
test eax, eax
je 0x429341
nop
push 0
push 1
push edi
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x429330
mov edx, dword [ebx + 4]
mov esi, dword [edx + 0x28]
test esi, esi
je 0x42940a
cmp dword [ebx + 0x18], 0
je 0x4293f7
cmp byte [esp + 0x44], 0
je 0x4293e6
mov eax, dword fs:[0x30]
mov ecx, dword [ebx]
mov dword [0x4fc574], ecx
mov edi, dword [eax + 0xa0]
mov eax, dword [edx + 0x50]
add eax, ecx
push edi
mov dword [0x4fc570], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
push 0x4288c0
push str.RtlPcToFileHeader
push 0x4cfd54
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call sym.AutoHotkey.exe_MinHookEnable
add esp, 0xc
mov dword [0x4fc56c], eax
mov eax, dword [esp + 0x10]
push ebx
push 1
push eax
add eax, esi
call eax
push dword [0x4fc56c]
mov esi, eax
call sym.AutoHotkey.exe_MinHookDisable
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x4293e6
push 0x45a
jmp 0x4291cc
mov dword [ebx + 0x14], 1
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x10]
add eax, esi
mov dword [ebx + 0x3c], eax
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov dword [ebx + 0x3c], 0
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret