Function at 0x411ba0
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x358
mov eax, dword [0x42a390]
xor eax, esp
push ebx
mov ebx, dword [esp + 0x360]
push esi
mov esi, dword [esp + 0x368]
push ebx
mov dword [esp + 0x360], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x411bfc
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x354]
xor ecx, esp
call fcn.0041413a
add esp, 0x358
ret
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call ebp
cmp eax, 0xff
ja 0x411f5b
push esi
call ebp
cmp eax, 0xff
ja 0x411f5b
push edi
push 0x103
lea eax, [esp + 0x160]
push ebx
push eax
call fcn.004151a0
add esp, 0xc
lea ecx, [esp + 0x15c]
push ecx
call ebp
mov edi, eax
lea edx, [esp + 0x15c]
lea eax, [esp + 0x15c]
dec edx
push 0x5c
push eax
add edi, edx
call fcn.00415c30
add esp, 8
cmp eax, edi
je 0x411c82
lea edi, [esp + 0x15c]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x411c70
mov cx, word [0x42450c]
mov word [edi], cx
lea edi, [esp + 0x15c]
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x411c90
mov edx, dword [0x425a24]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x160]
push ecx
mov dword [edi], edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x411ce0
xor eax, eax
pop edi
pop ebp
pop esi
pop ebx
mov ecx, dword [esp + 0x354]
xor ecx, esp
call fcn.0041413a
add esp, 0x358
ret
mov esi, dword [esp + 0x18]
jmp 0x411ce0
push 0x103
lea edx, [esp + 0x160]
push ebx
push edx
call fcn.004151a0
push 0x103
lea eax, [esp + 0x270]
push esi
push eax
call fcn.004151a0
add esp, 0x18
lea ecx, [esp + 0x15c]
push ecx
call ebp
lea edx, [esp + 0x15c]
push 0x5c
push edx
lea esi, [esp + eax + 0x164]
call fcn.00415c30
add esp, 8
cmp eax, esi
je 0x411d49
lea edi, [esp + 0x15c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x411d38
mov ax, word [0x42450c]
mov word [edi], ax
lea ecx, [esp + 0x260]
push ecx
call ebp
lea edx, [esp + 0x260]
push 0x5c
push edx
lea esi, [esp + eax + 0x268]
call fcn.00415c30
add esp, 8
cmp eax, esi
je 0x411d89
lea edi, [esp + 0x260]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x411d78
mov ax, word [0x42450c]
mov word [edi], ax
lea ecx, [esp + 0x48]
push ecx
call ebp
lea edx, [esp + 0x15c]
push edx
mov esi, eax
call ebp
add esi, eax
cmp esi, 0x103
ja 0x411f29
lea eax, [esp + 0x48]
push eax
call ebp
lea ecx, [esp + 0x260]
push ecx
mov esi, eax
call ebp
add esi, eax
cmp esi, 0x103
ja 0x411f29
lea eax, [esp + 0x48]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x411dd1
lea edi, [esp + 0x15c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x411de2
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [esp + 0x48]
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x411e00
lea edi, [esp + 0x260]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x411e13
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [esp + 0x1c]
and ecx, 3
test al, 0x10
rep movsb byte es:[edi], byte [esi]
je 0x411e8b
cmp byte [esp + 0x48], 0x2e
je 0x411ef6
lea edx, [esp + 0x260]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x411e5f
push eax
lea eax, [esp + 0x264]
push eax
call fcn.00411620
add esp, 8
mov ecx, dword [esp + 0x374]
push ecx
lea edx, [esp + 0x264]
push edx
lea eax, [esp + 0x164]
push eax
call fcn.00411ba0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
and ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x411ef6
lea ecx, [esp + 0x15c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x411eb0
push 0x80
lea edx, [esp + 0x264]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push 1
push 0
lea eax, [esp + 0x26c]
push eax
lea ecx, [esp + 0x16c]
push ecx
call fcn.00411a80
mov ecx, dword [esp + 0x24]
add esp, 0x14
and ecx, eax
mov dword [esp + 0x10], ecx
je 0x411ef6
mov eax, dword [esp + 0x374]
test eax, eax
je 0x411ef6
mov edx, eax
push edx
lea eax, [esp + 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x411cd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x411f41
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x411cbc
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x411cbc
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x10]
neg eax
sbb eax, eax
and eax, ecx
jmp 0x411cbe
push 0x6f
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x360]
pop ebp
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0041413a
add esp, 0x358
ret