Function at 0x416080
Capabilities:
Extract resource via kernel32 functions
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4ad7cd
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x6b0]
mov word [esi + 0x6cc], 0
test eax, eax
je 0x416448
cmp word [eax], 0
je 0x416448
cmp byte [0x4dbea6], 0
mov ebx, 0x4c9e84
mov dword [ebp - 0x60], vtable.TextStream.0
cmove ebx, eax
mov dword [ebp - 0x5c], 0
mov eax, dword [0x4dd650]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0xffffffff
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
cmp eax, 0xffffffff
je 0x416120
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x50], eax
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
neg eax
sbb al, al
and byte [ebp - 0x46], al
mov dword [ebp - 0x60], vtable.TextMem.0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
push 0xa
mov dword [ebp - 4], 0
push str._AUTOHOTKEY_SCRIPT_
push 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov byte [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
jne 0x416186
push 0xa
push str._AHK_WITH_ICON_
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x4163f8
push edi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4163f8
push edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4163f8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x4163f8
push 0xfde9
push 0xc
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x60]
call fcn.004782c0
mov eax, dword [esi + 0x6b0]
mov ecx, esi
inc dword [0x4dccf0]
mov dword [0x4dccf4], eax
lea eax, [ebp - 0x60]
push eax
call fcn.00416540
mov dword [ebp - 4], 0xffffffff
mov edi, eax
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x60], vtable.TextMem.0
test ecx, ecx
je 0x416219
cmp byte [ebp - 0x24], 0
je 0x416212
push ecx
call fcn.00497f48
add esp, 4
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x60], vtable.TextStream.0
test eax, eax
je 0x416230
push eax
call fcn.00497f48
add esp, 4
test edi, edi
je 0x416448
push 0
call dword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
mov ecx, esi
test eax, eax
jne 0x416269
push 0x4b431c
push str.An_internal_function_call_failed.
call fcn.00428f20
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [esi]
call fcn.0041f8f0
test eax, eax
je 0x416448
lea eax, [esi + 0x10]
mov ecx, esi
push eax
call fcn.0041f9a0
test eax, eax
je 0x416448
lea ebx, [esi + 0x24]
mov ecx, esi
push ebx
call fcn.0041f9a0
test eax, eax
je 0x416448
mov ecx, esi
call fcn.0042a240
test eax, eax
je 0x416448
xor edi, edi
lea eax, [esi + 0x10]
cmp dword [eax + 4], edi
jle 0x4162d4
mov eax, dword [eax]
mov ecx, esi
push dword [eax + edi*4]
call fcn.00429f50
test eax, eax
je 0x416448
inc edi
lea eax, [esi + 0x10]
cmp edi, dword [eax + 4]
jl 0x4162b7
xor edi, edi
cmp dword [ebx + 4], edi
jle 0x4162fa
nop dword [eax + eax]
mov eax, dword [ebx]
mov ecx, esi
push dword [eax + edi*4]
call fcn.00429f50
test eax, eax
je 0x416448
inc edi
cmp edi, dword [ebx + 4]
jl 0x4162e0
push dword [ebx]
call fcn.00497f48
mov eax, dword [esi + 0x26c]
add esp, 4
test eax, eax
je 0x41639e
mov eax, dword [eax + 0x10]
cmp dword [eax + 4], 0
je 0x416388
mov ecx, dword [eax + 8]
mov edi, dword [eax + 0x18]
test ecx, ecx
je 0x416388
lea eax, [ebp - 0x10]
push eax
push str.Line
call fcn.00473f10
test eax, eax
je 0x416369
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x416355
cmp ecx, 3
je 0x416355
cmp ecx, 6
je 0x41634c
mov ecx, dword [eax]
jmp 0x41635a
mov ecx, 0x4b431c
xor eax, eax
jmp 0x41635d
mov eax, dword [eax]
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
mov dword [esi + 0x27c], eax
mov dword [esi + 0x280], ecx
push edi
push str.Unknown_class.
mov ecx, esi
mov dword [esi + 0x644], 0
call fcn.00428f20
test eax, eax
je 0x416448
mov eax, dword [esi + 0x26c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov dword [esi + 0x26c], 0
push dword [esi + 0x6b4]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push 0
push 0
push 0
push 7
mov ecx, esi
call fcn.0041b540
test eax, eax
je 0x416448
push dword [esi]
mov ecx, esi
call fcn.0041fa00
test eax, eax
je 0x416448
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [ebp - 0x14]
call fcn.004138e0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push ebx
xorps xmm3, xmm3
xor edx, edx
mov ecx, str.Could_not_extract_script_from_EXE.
call fcn.0047fbd0
mov eax, dword [ebp - 0x2c]
add esp, 8
mov dword [ebp - 0x60], vtable.TextMem.0
test eax, eax
je 0x416431
cmp byte [ebp - 0x24], 0
je 0x41642a
push eax
call fcn.00497f48
add esp, 4
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x60], vtable.TextStream.0
test eax, eax
je 0x416448
push eax
call fcn.00497f48
add esp, 4
mov ecx, dword [ebp - 0xc]
or eax, 0xffffffff
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret