Function at 0x4041c0
Capabilities:
Check if file exists

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x409696
push eax
mov dword fs:[0], esp
sub esp, 0x524
push ebx
push esi
push edi
mov edi, dword [esp + 0x54c]
cmp edi, 1
mov esi, ecx
jne 0x4041f1
call fcn.004071b0
test edi, edi
setne al
push eax
lea ecx, [esp + 0x18]
call fcn.00407200
push 0x419b50
lea ecx, [esp + 0x10]
mov dword [esp + 0x53c], 0
call fcn.00408dd6
mov edi, dword [esp + 0x540]
mov byte [esp + 0x538], 1
cmp byte [edi], 0
je 0x4043da
lea ecx, [esp + 0x120]
add esi, 4
push ecx
mov ecx, esi
call fcn.00407a30
lea edx, [esp + 0x224]
mov ecx, esi
push edx
call fcn.00407ae0
lea eax, [esp + 0x328]
mov ecx, esi
push eax
call fcn.004079f0
lea ecx, [esp + 0x42c]
push ecx
mov ecx, esi
call fcn.00407b90
mov edx, dword [esp + 0x544]
test edx, edx
jle 0x404396
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea esi, [edi + 0x104]
mov dword [esp + 0x14], edx
cmp byte [esi + 6], 1
jne 0x404372
mov al, byte [esp + 0x54c]
cmp al, 1
mov al, byte [esi + 4]
jne 0x4042b8
cmp al, 1
jne 0x404372
jmp 0x4042c0
cmp al, 1
je 0x404372
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov eax, dword [esi]
test eax, eax
jne 0x4042dc
lea edx, [esp + 0x32c]
jmp 0x40432c
cmp eax, 1
jne 0x4042fe
lea eax, [esp + 0x124]
lea ecx, [esp + 0x20]
push eax
push ecx
call ebp
lea edx, [esi - 0x104]
lea eax, [esp + 0x20]
push edx
push eax
jmp 0x404340
cmp eax, 2
jne 0x404320
lea ecx, [esp + 0x228]
lea edx, [esp + 0x20]
push ecx
push edx
call ebp
lea eax, [esi - 0x104]
lea ecx, [esp + 0x20]
push eax
push ecx
jmp 0x404340
cmp eax, 3
jne 0x404342
lea edx, [esp + 0x430]
lea eax, [esp + 0x20]
push edx
push eax
call ebp
lea ecx, [esi - 0x104]
lea edx, [esp + 0x20]
push ecx
push edx
call ebx
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x40436e
lea ecx, [esp + 0x20]
lea edx, [esp + 0x10]
push ecx
push 0x40d5f4
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov byte [esi + 5], 0
jmp 0x404372
mov byte [esi + 5], 1
mov eax, dword [esp + 0x14]
add esi, 0x31c
dec eax
mov dword [esp + 0x14], eax
jne 0x404296
mov edi, dword [esp + 0x544]
mov edx, dword [esp + 0x548]
pop ebp
xor ecx, ecx
test edx, edx
jle 0x4043da
lea eax, [edi + 0x108]
cmp byte [eax + 2], 1
jne 0x4043d0
mov bl, byte [esp + 0x548]
cmp bl, 1
mov bl, byte [eax]
jne 0x4043c4
cmp bl, 1
jne 0x4043d0
mov bl, byte [eax + 1]
test bl, bl
je 0x40441b
jmp 0x4043d0
cmp bl, 1
je 0x4043d0
mov bl, byte [eax + 1]
test bl, bl
je 0x404447
inc ecx
add eax, 0x31c
cmp ecx, edx
jl 0x4043a2
lea ecx, [esp + 0xc]
mov byte [esp + 0x538], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0x538], 0xffffffff
call fcn.00407250
xor eax, eax
mov ecx, dword [esp + 0x530]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x530
ret 0x10
lea ecx, [esp + 0xc]
mov byte [esp + 0x538], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0x538], 0xffffffff
call fcn.00407250
mov eax, 2
jmp 0x404401
lea ecx, [esp + 0xc]
mov byte [esp + 0x538], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0x538], 0xffffffff
call fcn.00407250
mov eax, 1
jmp 0x404401