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

Disassembly:
sub esp, 0x218
mov eax, dword [0x42c400]
xor eax, esp
mov dword [esp + 0x214], eax
push ebp
push esi
push edi
push 0x103
lea eax, [esp + 0x11]
push 0
push eax
mov byte [esp + 0x18], 0
call fcn.0041c150
add esp, 0xc
push 0x103
lea ecx, [esp + 0x119]
push 0
push ecx
mov byte [esp + 0x120], 0
call fcn.0041c150
add esp, 0xc
lea edi, [esp + 0xc]
call fcn.00407020
mov edx, edi
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push edx
call edi
lea eax, [esp + 0xc]
push eax
push str.InstallDir_s
lea ecx, [esp + 0x11c]
push 0x103
push ecx
call fcn.004135e2
lea edx, [esp + 0x124]
push edx
call fcn.00413329
lea eax, [esp + 0x20]
add esp, 0x14
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4055d6
mov ecx, dword [str.Setup.bat]
mov edx, dword [0x425c24]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [eax], ecx
mov cx, word [0x425c28]
mov dword [eax + 4], edx
mov dl, byte [0x425c2a]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
lea eax, [esp + 0xc]
push eax
call ebp
cmp eax, 0xffffffff
lea ecx, [esp + 0xc]
jne 0x40565f
push ecx
push 0x425c2c
push 0x763
push str..Setup.cpp
push 2
mov ecx, str.RunSetupBat
call fcn.00405d70
add esp, 0x14
lea edx, [esp + 0xc]
push edx
push 0x425c2c
push 0x763
push str..Setup.cpp
push 2
mov ecx, str.RunSetupBat
call fcn.00405a90
add esp, 0x14
jmp 0x4056b8
push 0x1d4c0
mov edx, str.InstallSpecial
call fcn.00405960
add esp, 4
mov esi, eax
push esi
lea eax, [esp + 0x10]
push eax
push 0x425c5c
push 0x769
push str..Setup.cpp
push 2
mov ecx, str.RunSetupBat
call fcn.00405d70
push esi
lea ecx, [esp + 0x28]
push ecx
push 0x425c5c
push 0x769
push str..Setup.cpp
push 2
mov ecx, str.RunSetupBat
call fcn.00405a90
add esp, 0x30
lea eax, [esp + 0xc]
call fcn.0040b3a0
lea eax, [esp + 0xc]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4056c8
mov edx, dword [str.IsAgent_]
mov ecx, dword [0x425720]
mov dword [eax], edx
mov dx, word [0x425724]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0xc]
push eax
call edi
lea eax, [esp + 0xc]
add eax, 0xffffffff
lea esp, [esp]
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x405700
mov ecx, dword [str.Setup.bat]
mov edx, dword [0x425c24]
mov dword [eax], ecx
mov cx, word [0x425c28]
mov dword [eax + 4], edx
mov dl, byte [0x425c2a]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
lea eax, [esp + 0xc]
push eax
call ebp
cmp eax, 0xffffffff
lea ecx, [esp + 0xc]
jne 0x405799
push ecx
push 0x425c2c
push 0x776
push str..Setup.cpp
push 2
mov ecx, str.RunSetupBat
call fcn.00405d70
add esp, 0x14
lea edx, [esp + 0xc]
push edx
push 0x425c2c
push 0x776
push str..Setup.cpp
push 2
mov ecx, str.RunSetupBat
call fcn.00405a90
add esp, 0x14
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.0041310b
add esp, 0x218
ret
push 0
mov edx, str.Normal
call fcn.00405960
add esp, 4
mov esi, eax
push esi
lea eax, [esp + 0x10]
push eax
push 0x425c5c
push 0x77b
push str..Setup.cpp
push 2
mov ecx, str.RunSetupBat
call fcn.00405d70
push esi
lea ecx, [esp + 0x28]
push ecx
push 0x425c5c
push 0x77b
push str..Setup.cpp
push 2
mov ecx, str.RunSetupBat
call fcn.00405a90
mov ecx, dword [esp + 0x250]
add esp, 0x30
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.0041310b
add esp, 0x218
ret