Function at 0x41f990
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 ecx, [esp + 0x1c]
push ecx
push 0
mov byte [ebp + 0x61e], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [esp + 0x14], eax
test eax, eax
je 0x41fa12
cmp eax, 0x800
jne 0x41f9d7
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.0047c6c0
mov dword [ebp + 0x60c], eax
test eax, eax
je 0x41f9c8
mov edx, ebx
push 0x5c
push edx
call fcn.004939bc
add esp, 8
test eax, eax
je 0x41fa12
mov ecx, eax
mov eax, ebx
sub ecx, eax
call fcn.0047c6c0
mov dword [ebp + 0x610], eax
test eax, eax
je 0x41f9c8
mov edi, dword [esp + 0xb34]
test edi, edi
jne 0x41fb36
lea ecx, [esp + 0x18]
push 0x5c
push ecx
call fcn.004939bc
mov esi, eax
add esp, 8
test esi, esi
je 0x41f9c8
push 0x2e
push esi
call fcn.004939bc
add esp, 8
test eax, eax
je 0x41f9c8
mov edx, eax
lea ecx, [esp + 0x18]
sub edx, ecx
add edx, 5
cmp edx, 0x800
jae 0x41f9c8
mov edx, dword [str..ahk]
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [eax], edx
mov cl, byte [0x4ab824]
lea edx, [esp + 0x18]
mov byte [eax + 4], cl
mov eax, edx
push eax
mov dword [esp + 0xb38], edx
call ebx
cmp eax, 0xffffffff
jne 0x41fb2f
lea ecx, [esp + 0x920]
mov edx, ecx
push 0x4a7935
push edx
mov dword [esp + 0xb3c], ecx
call fcn.0044fbc0
mov ecx, esi
add esp, 8
lea edi, [ecx + 1]
nop
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x41fab0
sub ecx, edi
lea ecx, [ecx + eax + 1]
cmp ecx, 0x201
ja 0x41f9c8
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 0x41fad4
lea edx, [esp + 0x920]
push edx
call ebx
cmp eax, 0xffffffff
jne 0x41fb2f
mov eax, dword [ebp + 0x610]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push str.AutoHotkey.chm
call ebx
cmp eax, 0xffffffff
je 0x41fb2f
push 0
push 0
push 0
push 0
push 0x4ab838
push 0
push 0
push str._ms_its:AutoHotkey.chm::_docs_Welcome.htm_
push ebp
mov edx, str.hh.exe
call fcn.0043c410
test eax, eax
jne 0x41f9c8
mov edi, dword [esp + 0xb34]
cmp byte [edi], 0x2a
mov esi, 2
jne 0x41fb7c
cmp byte [edi + 1], 0
jne 0x41fb69
mov dword [ebp + 0x618], esi
mov word [esp + 0x18], 0x2a
mov dword [0x4bb5a0], 4
mov dword [0x4bb5b4], 1
jmp 0x41fb86
mov dword [ebp + 0x618], 1
mov byte [0x4b7492], 0
jmp 0x41fb86
mov dword [ebp + 0x618], 0
lea ecx, [esp + 0x18]
cmp edi, ecx
je 0x41fbbf
cmp dword [ebp + 0x618], 1
je 0x41fbbf
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 0x41f9c8
cmp eax, 0x800
jae 0x41f9c8
cmp dword [ebp + 0x618], esi
je 0x41fbff
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push 0x104
push ecx
lea ebx, [esp + 0x824]
call fcn.00480490
add esp, 0xc
test eax, eax
je 0x41fbff
mov edx, dword [esp + 0x14]
inc edx
push edx
mov eax, ebx
push eax
lea ecx, [esp + 0x20]
push ecx
call fcn.0049b620
add esp, 0xc
cmp byte [esp + 0x18], 0
je 0x41fc66
lea eax, [esp + 0x18]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x41fc10
sub eax, edx
mov edi, eax
lea eax, [edi + 1]
call fcn.0047c730
mov esi, eax
test esi, esi
jne 0x41fc46
lea edx, [esp + 0x18]
push edx
push str.Out_of_memory.
mov ecx, 0x4bc460
call fcn.0043b780
mov edi, dword [esp + 0xb34]
jmp 0x41fc6b
test edi, edi
je 0x41fc59
push edi
lea eax, [esp + 0x1c]
push eax
push esi
call fcn.0049b620
add esp, 0xc
mov byte [esi + edi], 0
mov edi, dword [esp + 0xb34]
jmp 0x41fc6b
mov esi, 0x4a7935
mov dword [ebp + 0x600], esi
test esi, esi
je 0x41f9c8
lea ecx, [esp + 0x18]
push 0x5c
push ecx
call fcn.004939bc
mov esi, eax
add esp, 8
test esi, esi
je 0x41fcae
lea edx, [esp + 0x18]
mov ecx, esi
sub ecx, edx
mov ebx, edx
call fcn.0047c6c0
mov dword [ebp + 0x604], eax
test eax, eax
je 0x41f9c8
inc esi
jmp 0x41fcb2
lea esi, [esp + 0x18]
or ecx, 0xffffffff
mov ebx, esi
call fcn.0047c6c0
mov dword [ebp + 0x608], eax
test eax, eax
je 0x41f9c8
push 0x4a7954
push edi
call fcn.00492db2
add esp, 8
test eax, eax
je 0x41fd03
cmp dword [ebp + 0x618], 1
mov eax, str.AutoHotkey_v1.1.36.02
jne 0x41fcec
mov eax, edi
push eax
push str.____s
mov eax, 0x800
lea ecx, [esp + 0x20]
call fcn.0047f750
add esp, 8
or ecx, 0xffffffff
lea ebx, [esp + 0x18]
call fcn.0047c6c0
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