Function at 0x41f390
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov ebp, edx
mov dword [esp + 0x18], ecx
xor esi, esi
push edi
test ebp, ebp
je 0x41f3a8
cmp ebp, 0x40
jb 0x41f3c6
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x41f85b
test ebp, ebp
je 0x41f3d8
mov eax, dword [ecx + 0x3c]
add eax, 0xf8
cmp ebp, eax
jae 0x41f3d8
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 edi, dword [ecx + 0x3c]
add edi, ecx
mov dword [esp + 0x18], edi
cmp dword [edi], 0x4550
jne 0x41f85b
mov eax, 0x14c
cmp word [edi + 4], ax
jne 0x41f85b
mov ebx, dword [edi + 0x38]
test bl, 1
jne 0x41f85b
movzx edx, word [edi + 0x14]
movzx eax, word [edi + 6]
add edx, 0x24
test eax, eax
je 0x41f440
add edx, edi
mov edi, eax
nop dword [eax + eax]
mov eax, dword [edx + 4]
lea edx, [edx + 0x28]
test eax, eax
mov ecx, ebx
cmovne ecx, eax
add ecx, dword [edx - 0x28]
cmp ecx, esi
cmovbe ecx, esi
mov esi, ecx
sub edi, 1
jne 0x41f420
mov edi, dword [esp + 0x18]
lea ecx, [ebx - 1]
lea edx, [ebx - 1]
not ecx
add edx, dword [edi + 0x50]
lea eax, [ebx - 1]
add eax, esi
and edx, ecx
and eax, ecx
mov dword [esp + 0x20], edx
cmp edx, eax
jne 0x41f85b
mov esi, dword [esp + 0x40]
push esi
push 4
push 0x3000
push edx
push dword [edi + 0x34]
call fcn.0041f320
add esp, 0x14
mov dword [esp + 0x10], eax
test eax, eax
jne 0x41f49d
push esi
push 4
push 0x3000
push dword [esp + 0x2c]
push eax
call fcn.0041f320
add esp, 0x14
mov dword [esp + 0x10], eax
test eax, eax
je 0x41f4cc
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 + 0x24], ebx
test ebx, ebx
jne 0x41f4de
mov ecx, dword [esp + 0x10]
push esi
push 0x8000
push eax
push ecx
call fcn.0041f340
add esp, 0x10
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 ecx, dword [esp + 0x10]
mov dword [ebx + 0xc], eax
mov dword [ebx], ecx
movzx eax, word [edi + 0x16]
shr eax, 0xd
and eax, 1
mov dword [ebx + 0x20], fcn.0041f320
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 + 0x24], fcn.0041f340
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x38], esi
mov eax, dword [edi + 0x38]
mov dword [ebx + 0x40], eax
test ebp, ebp
je 0x41f54e
cmp ebp, dword [edi + 0x54]
jae 0x41f54e
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, ebx
call fcn.0041f9f0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push esi
push 4
push 0x1000
push dword [edi + 0x54]
push ecx
call fcn.0041f320
add esp, 0x14
mov esi, eax
push dword [edi + 0x54]
push dword [esp + 0x20]
push esi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x28]
xor edx, edx
mov ecx, dword [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0x20], 0
mov eax, dword [eax + 0x3c]
add eax, esi
mov dword [ebx + 4], eax
mov dword [eax + 0x34], ecx
mov ecx, dword [ebx + 4]
mov esi, dword [ebx]
mov dword [esp + 0x14], esi
movzx eax, word [ecx + 0x14]
add eax, 0x24
cmp dx, word [ecx + 6]
jae 0x41f66e
lea edi, [eax + ecx]
nop
mov edx, dword [edi + 4]
test edx, edx
jne 0x41f5fc
mov eax, dword [esp + 0x18]
mov esi, dword [eax + 0x38]
test esi, esi
jle 0x41f64a
push dword [ebx + 0x38]
mov eax, dword [edi]
add eax, dword [esp + 0x18]
mov ecx, dword [ebx + 0x20]
push 4
push 0x1000
push esi
push eax
call ecx
add esp, 0x14
test eax, eax
je 0x41f53d
mov eax, dword [edi]
add eax, dword [esp + 0x14]
push esi
push 0
push eax
mov dword [edi - 4], eax
call sub.VCRUNTIME140.dll_memset
jmp 0x41f647
test ebp, ebp
je 0x41f60d
mov eax, dword [edi + 8]
add eax, edx
cmp ebp, eax
jb 0x41f535
push dword [ebx + 0x38]
mov eax, dword [edi]
mov ecx, dword [ebx + 0x20]
add eax, esi
push 4
push 0x1000
push edx
push eax
call ecx
add esp, 0x14
test eax, eax
je 0x41f53d
push dword [edi + 4]
mov eax, dword [edi + 8]
mov esi, dword [edi]
add eax, dword [esp + 0x20]
add esi, dword [esp + 0x18]
push eax
push esi
call sub.VCRUNTIME140.dll_memcpy
mov dword [edi - 4], esi
add esp, 0xc
mov ecx, dword [ebx + 4]
add edi, 0x28
mov edx, dword [esp + 0x20]
inc edx
mov dword [esp + 0x20], edx
movzx eax, word [ecx + 6]
cmp edx, eax
jge 0x41f66a
mov esi, dword [esp + 0x14]
jmp 0x41f5b0
mov edi, dword [esp + 0x18]
mov eax, dword [ecx + 0x34]
sub eax, dword [edi + 0x34]
mov dword [esp + 0x1c], eax
je 0x41f719
cmp dword [ecx + 0xa4], 0
jne 0x41f68e
xor eax, eax
jmp 0x41f71e
mov eax, dword [ecx + 0xa0]
mov edx, dword [ebx]
add eax, edx
mov dword [esp + 0x14], edx
mov dword [esp + 0x20], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x41f719
lea edi, [eax + 4]
xor esi, esi
lea ebp, [ecx + edx]
lea edx, [eax + 8]
mov eax, dword [edi]
sub eax, 8
test eax, 0xfffffffe
jbe 0x41f6ef
mov ebx, dword [esp + 0x1c]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x41f6dc
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 0x41f6c1
mov ebx, dword [esp + 0x24]
mov esi, dword [ebx + 0x40]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push esi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [esp + 0x20]
add eax, dword [edi]
mov edx, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov ecx, dword [eax]
test ecx, ecx
jne 0x41f6a6
mov edi, dword [esp + 0x18]
mov eax, 1
mov ecx, ebx
mov dword [ebx + 0x1c], eax
call fcn.0041f000
test eax, eax
je 0x41f53d
mov ecx, ebx
call fcn.0041ee90
test eax, eax
je 0x41f53d
mov eax, dword [0x4ca7b8]
xor ecx, ecx
cdq
cmp dword [edi + 0x34], eax
jne 0x41f750
cmp ecx, edx
je 0x41f781
mov eax, dword [ebx + 4]
mov esi, dword [eax + 0xc0]
test esi, esi
je 0x41f781
mov edi, dword [ebx]
mov esi, dword [esi + edi + 0xc]
test esi, esi
je 0x41f781
mov eax, dword [esi]
test eax, eax
je 0x41f781
nop dword [eax]
push 0
push 1
push edi
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x41f770
mov edx, dword [ebx + 4]
mov esi, dword [edx + 0x28]
test esi, esi
je 0x41f84a
cmp dword [ebx + 0x18], 0
je 0x41f837
cmp byte [esp + 0x44], 0
je 0x41f826
mov eax, dword fs:[0x30]
mov ecx, dword [ebx]
mov dword [0x4cb230], ecx
mov edi, dword [eax + 0xa0]
mov eax, dword [edx + 0x50]
add eax, ecx
push edi
mov dword [0x4cb22c], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
push 0x41ed80
push str.RtlPcToFileHeader
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call sym.AutoHotkeySC.bin_MinHookEnable
add esp, 0xc
mov dword [0x4cb228], eax
mov eax, dword [esp + 0x10]
push ebx
push 1
push eax
add eax, esi
call eax
push dword [0x4cb228]
mov esi, eax
call sym.AutoHotkeySC.bin_MinHookDisable
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
jne 0x41f826
push 0x45a
jmp 0x41f537
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