Function at 0x41fac0
Capabilities:
Check if file exists
Get file attributes
Set current directory

Disassembly:
sub esp, 0xb1c
push ebx
push ebp
mov ebp, dword [esp + 0xb28]
push esi
push edi
push 0x800
lea eax, [esp + 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x41fb3c
cmp eax, 0x800
jne 0x41fb01
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xb1c
ret 8
mov ecx, eax
lea ebx, [esp + 0x18]
call fcn.0047ce20
mov dword [ebp + 0x60c], eax
test eax, eax
je 0x41faf2
mov ecx, ebx
push 0x5c
push ecx
call fcn.004940fc
add esp, 8
test eax, eax
je 0x41fb3c
mov ecx, eax
mov edx, ebx
sub ecx, edx
call fcn.0047ce20
mov dword [ebp + 0x610], eax
test eax, eax
je 0x41faf2
mov edi, dword [esp + 0xb34]
test edi, edi
jne 0x41fc66
lea eax, [esp + 0x18]
push 0x5c
push eax
call fcn.004940fc
mov esi, eax
add esp, 8
test esi, esi
je 0x41faf2
push 0x2e
push esi
call fcn.004940fc
add esp, 8
test eax, eax
je 0x41faf2
mov ecx, eax
lea edx, [esp + 0x18]
sub ecx, edx
add ecx, 5
cmp ecx, 0x800
jae 0x41faf2
mov ecx, dword [str..ahk]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [eax], ecx
mov dl, byte [0x4ab82c]
mov byte [eax + 4], dl
lea eax, [esp + 0x18]
mov ecx, eax
push ecx
mov dword [esp + 0xb38], eax
call ebx
cmp eax, 0xffffffff
jne 0x41fc5f
lea edx, [esp + 0x920]
mov eax, edx
push 0x4a7935
push eax
mov dword [esp + 0xb3c], edx
call fcn.0044fc90
mov ecx, esi
add esp, 8
lea edi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x41fbe0
sub ecx, edi
lea ecx, [ecx + eax + 1]
cmp ecx, 0x201
ja 0x41faf2
lea edx, [esp + eax + 0x920]
mov ecx, esi
sub edx, esi
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x41fc04
lea edx, [esp + 0x920]
push edx
call ebx
cmp eax, 0xffffffff
jne 0x41fc5f
mov eax, dword [ebp + 0x610]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push str.AutoHotkey.chm
call ebx
cmp eax, 0xffffffff
je 0x41fc5f
push 0
push 0
push 0
push 0
push 0x4ab840
push 0
push 0
push str._ms_its:AutoHotkey.chm::_docs_Welcome.htm_
push ebp
mov edx, str.hh.exe
call fcn.0043c4d0
test eax, eax
jne 0x41faf2
mov edi, dword [esp + 0xb34]
cmp byte [edi], 0x2a
mov esi, 2
jne 0x41fcac
cmp byte [edi + 1], 0
jne 0x41fc99
mov dword [ebp + 0x618], esi
mov word [esp + 0x18], 0x2a
mov dword [0x4bb604], 4
mov dword [0x4bb618], 1
jmp 0x41fcb6
mov dword [ebp + 0x618], 1
mov byte [0x4b7492], 0
jmp 0x41fcb6
mov dword [ebp + 0x618], 0
lea ecx, [esp + 0x18]
cmp edi, ecx
je 0x41fcef
cmp dword [ebp + 0x618], 1
je 0x41fcef
push 0
mov edx, ecx
push edx
push 0x800
push edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x41faf2
cmp eax, 0x800
jae 0x41faf2
cmp dword [ebp + 0x618], esi
je 0x41fd2f
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push 0x104
push ecx
lea ebx, [esp + 0x824]
call fcn.00480bf0
add esp, 0xc
test eax, eax
je 0x41fd2f
mov edx, dword [esp + 0x14]
inc edx
push edx
mov eax, ebx
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0049b8f0
add esp, 0xc
cmp byte [esp + 0x18], 0
je 0x41fd96
lea eax, [esp + 0x18]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fd40
sub eax, edx
mov edi, eax
lea eax, [edi + 1]
call fcn.0047ce90
mov esi, eax
test esi, esi
jne 0x41fd76
lea edx, [esp + 0x18]
push edx
push str.Out_of_memory.
mov ecx, 0x4bc4c8
call fcn.0043b860
mov edi, dword [esp + 0xb34]
jmp 0x41fd9b
test edi, edi
je 0x41fd89
push edi
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.0049b8f0
add esp, 0xc
mov byte [esi + edi], 0
mov edi, dword [esp + 0xb34]
jmp 0x41fd9b
mov esi, 0x4a7935
mov dword [ebp + 0x600], esi
test esi, esi
je 0x41faf2
lea ecx, [esp + 0x18]
push 0x5c
push ecx
call fcn.004940fc
mov esi, eax
add esp, 8
test esi, esi
je 0x41fdde
lea edx, [esp + 0x18]
mov ecx, esi
sub ecx, edx
mov ebx, edx
call fcn.0047ce20
mov dword [ebp + 0x604], eax
test eax, eax
je 0x41faf2
inc esi
jmp 0x41fde2
lea esi, [esp + 0x18]
or ecx, 0xffffffff
mov ebx, esi
call fcn.0047ce20
mov dword [ebp + 0x608], eax
test eax, eax
je 0x41faf2
push 0x4a7954
push edi
call fcn.004934f2
add esp, 8
test eax, eax
je 0x41fe33
cmp dword [ebp + 0x618], 1
mov eax, str.AutoHotkey_v1.1.37.02
jne 0x41fe1c
mov eax, edi
push eax
push str.____s
mov eax, 0x800
lea ecx, [esp + 0x20]
call fcn.0047feb0
add esp, 8
or ecx, 0xffffffff
lea ebx, [esp + 0x18]
call fcn.0047ce20
xor ecx, ecx
test eax, eax
setne cl
pop edi
pop esi
mov dword [ebp + 0x614], eax
pop ebp
pop ebx
mov eax, ecx
add esp, 0xb1c
ret 8