Function at 0x41fa30
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 0x41faac
cmp eax, 0x800
jne 0x41fa71
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.0047cd90
mov dword [ebp + 0x60c], eax
test eax, eax
je 0x41fa62
mov ecx, ebx
push 0x5c
push ecx
call fcn.0049406c
add esp, 8
test eax, eax
je 0x41faac
mov ecx, eax
mov edx, ebx
sub ecx, edx
call fcn.0047cd90
mov dword [ebp + 0x610], eax
test eax, eax
je 0x41fa62
mov edi, dword [esp + 0xb34]
test edi, edi
jne 0x41fbd6
lea eax, [esp + 0x18]
push 0x5c
push eax
call fcn.0049406c
mov esi, eax
add esp, 8
test esi, esi
je 0x41fa62
push 0x2e
push esi
call fcn.0049406c
add esp, 8
test eax, eax
je 0x41fa62
mov ecx, eax
lea edx, [esp + 0x18]
sub ecx, edx
add ecx, 5
cmp ecx, 0x800
jae 0x41fa62
mov ecx, dword [str..ahk]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [eax], ecx
mov dl, byte [0x4ab818]
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 0x41fbcf
lea edx, [esp + 0x920]
mov eax, edx
push 0x4a78b1
push eax
mov dword [esp + 0xb3c], edx
call fcn.0044fc00
mov ecx, esi
add esp, 8
lea edi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x41fb50
sub ecx, edi
lea ecx, [ecx + eax + 1]
cmp ecx, 0x201
ja 0x41fa62
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 0x41fb74
lea edx, [esp + 0x920]
push edx
call ebx
cmp eax, 0xffffffff
jne 0x41fbcf
mov eax, dword [ebp + 0x610]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push str.AutoHotkey.chm
call ebx
cmp eax, 0xffffffff
je 0x41fbcf
push 0
push 0
push 0
push 0
push 0x4ab82c
push 0
push 0
push str._ms_its:AutoHotkey.chm::_docs_Welcome.htm_
push ebp
mov edx, str.hh.exe
call fcn.0043c440
test eax, eax
jne 0x41fa62
mov edi, dword [esp + 0xb34]
cmp byte [edi], 0x2a
mov esi, 2
jne 0x41fc1c
cmp byte [edi + 1], 0
jne 0x41fc09
mov dword [ebp + 0x618], esi
mov word [esp + 0x18], 0x2a
mov dword [0x4bb604], 4
mov dword [0x4bb618], 1
jmp 0x41fc26
mov dword [ebp + 0x618], 1
mov byte [0x4b7492], 0
jmp 0x41fc26
mov dword [ebp + 0x618], 0
lea ecx, [esp + 0x18]
cmp edi, ecx
je 0x41fc5f
cmp dword [ebp + 0x618], 1
je 0x41fc5f
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 0x41fa62
cmp eax, 0x800
jae 0x41fa62
cmp dword [ebp + 0x618], esi
je 0x41fc9f
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push 0x104
push ecx
lea ebx, [esp + 0x824]
call fcn.00480b60
add esp, 0xc
test eax, eax
je 0x41fc9f
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 0x41fd06
lea eax, [esp + 0x18]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fcb0
sub eax, edx
mov edi, eax
lea eax, [edi + 1]
call fcn.0047ce00
mov esi, eax
test esi, esi
jne 0x41fce6
lea edx, [esp + 0x18]
push edx
push str.Out_of_memory.
mov ecx, 0x4bc4c8
call fcn.0043b7d0
mov edi, dword [esp + 0xb34]
jmp 0x41fd0b
test edi, edi
je 0x41fcf9
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 0x41fd0b
mov esi, 0x4a78b1
mov dword [ebp + 0x600], esi
test esi, esi
je 0x41fa62
lea ecx, [esp + 0x18]
push 0x5c
push ecx
call fcn.0049406c
mov esi, eax
add esp, 8
test esi, esi
je 0x41fd4e
lea edx, [esp + 0x18]
mov ecx, esi
sub ecx, edx
mov ebx, edx
call fcn.0047cd90
mov dword [ebp + 0x604], eax
test eax, eax
je 0x41fa62
inc esi
jmp 0x41fd52
lea esi, [esp + 0x18]
or ecx, 0xffffffff
mov ebx, esi
call fcn.0047cd90
mov dword [ebp + 0x608], eax
test eax, eax
je 0x41fa62
push 0x4a7944
push edi
call fcn.00493462
add esp, 8
test eax, eax
je 0x41fda3
cmp dword [ebp + 0x618], 1
mov eax, str.AutoHotkey_v1.1.37.01
jne 0x41fd8c
mov eax, edi
push eax
push str.____s
mov eax, 0x800
lea ecx, [esp + 0x20]
call fcn.0047fe20
add esp, 8
or ecx, 0xffffffff
lea ebx, [esp + 0x18]
call fcn.0047cd90
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