Function at 0x4221ba
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4af14a
mov eax, dword fs:[0]
push eax
sub esp, 0x118
push ebx
push esi
push edi
mov eax, dword [0x4dd070]
xor eax, esp
push eax
lea eax, [esp + 0x128]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [esp + 0x18], ebx
mov eax, dword [ebx + 0x5a4]
sub eax, dword [ebx + 0x5a0]
push 0x74
cdq
pop ecx
idiv ecx
and dword [esp + 0x14], 0
test eax, eax
jbe 0x4223b2
add ebx, 0x5d0
mov dword [esp + 0x1c], ebx
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
call fcn.00422cf6
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [esp + 0xa0]
push edx
call dword [eax + 0x38]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [esp + 0xa0]
inc bl
call fcn.0045671f
mov esi, dword [esp + 0x18]
add esi, 0x594
push edi
test bl, bl
jne 0x4224a7
mov dword [esp + 0x28], esi
call fcn.00422caf
mov edx, dword [eax + 0x14]
push 4
push 0x4b87f4
call fcn.00402a6a
test eax, eax
je 0x422394
mov esi, dword [esp + 0x1c]
call fcn.00422cf6
mov ecx, dword [eax]
mov eax, dword [ecx]
lea edx, [esp + 0xa0]
push edx
call dword [eax + 0x38]
mov dword [esp + 0x130], 2
push dword [eax]
lea esi, [esp + 0x50]
call fcn.00402703
mov byte [esp + 0x130], 3
mov esi, dword [esp + 0x1c]
call fcn.00422cf6
push dword [eax]
mov eax, str.__input_name
call fcn.0045e951
push eax
lea esi, [esp + 0x6c]
call fcn.00402703
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x138], 4
call fcn.00403ea7
sub esp, 0x10
mov byte [esp + 0x148], 5
mov edx, eax
mov esi, esp
mov dword [esp + 0x44], esp
call fcn.00430e5a
lea eax, [esp + 0x80]
push eax
lea eax, [esp + 0xa0]
push eax
mov byte [esp + 0x150], 6
call fcn.00403ea7
pop ecx
pop ecx
mov byte [esp + 0x148], 7
push dword [ebp + 8]
call fcn.00431fff
mov edi, eax
mov byte [esp + 0x148], 8
call fcn.004310b2
xor ebx, ebx
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [esp + 0x8c]
call fcn.00402abb
push ebx
push edi
lea ecx, [esp + 0x38]
call fcn.00402abb
push ebx
push edi
lea esi, [esp + 0x70]
call fcn.00402bb8
push ebx
push edi
lea esi, [esp + 0x54]
call fcn.00402bb8
or dword [esp + 0x130], 0xffffffff
lea ecx, [esp + 0xa0]
call fcn.0045671f
mov esi, dword [esp + 0x24]
mov eax, dword [esi + 0x10]
sub eax, dword [esi + 0xc]
push 0x74
cdq
pop ecx
idiv ecx
inc dword [esp + 0x14]
cmp dword [esp + 0x14], eax
jb 0x42221b
mov ebx, dword [esp + 0x18]
cmp dword [ebx + 0x554], 0
je 0x422420
lea eax, [ebx + 0x540]
push eax
lea eax, [esp + 0x34]
push eax
call fcn.00403ea7
sub esp, 0x10
mov dword [esp + 0x148], 9
mov edx, eax
mov esi, esp
mov dword [esp + 0x44], esp
call fcn.00430e5a
push dword [ebp + 8]
mov edx, str.__desc
mov byte [esp + 0x14c], 0xa
call fcn.00431fdf
mov edi, eax
mov byte [esp + 0x148], 9
call fcn.004310b2
or dword [esp + 0x130], 0xffffffff
push 0
push 1
lea ecx, [esp + 0x38]
call fcn.00402abb
mov eax, dword [ebx + 0x5c4]
mov eax, dword [eax]
mov ecx, dword [ebx + 0x5ac]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x5c4]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x5ac]
lea edi, [esp + 0x1c]
lea esi, [esp + 0x24]
mov dword [esp + 0x1c], eax
call fcn.00429373
test al, al
jne 0x42251e
call fcn.00429348
sub esp, 0x18
lea edx, [eax + 0x1c]
mov esi, esp
mov dword [esp + 0x44], esp
call fcn.00430e5a
lea esi, [esp + 0x3c]
mov dword [esp + 0x148], 0xb
call fcn.00429348
push dword [ebp + 8]
call fcn.00431fff
or dword [esp + 0x148], 0xffffffff
mov edi, eax
call fcn.004310b2
call fcn.0040654a
jmp 0x422436
call fcn.00422caf
add eax, 0x38
cmp dword [eax + 0x18], 8
jb 0x4224ba
mov eax, dword [eax + 4]
jmp 0x4224bd
add eax, 4
push eax
push 0x4bd434
lea ecx, [esp + 0x38]
call fcn.00427909
pop ecx
pop ecx
cmp dword [eax + 0x18], 8
jb 0x4224d9
mov ecx, dword [eax + 4]
jmp 0x4224dc
lea ecx, [eax + 4]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 4]
push 0x40
push 0x4b979c
push ecx
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
or dword [esp + 0x130], 0xffffffff
push 0
push 1
lea esi, [esp + 0x38]
call fcn.00402bb8
mov esi, dword [esp + 0x1c]
call fcn.00422cf6
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x104]
xor eax, eax
jmp 0x42254e
lea esi, [ebx + 0x5e8]
cmp dword [esi + 0x18], 8
jb 0x42252f
mov eax, dword [esi + 4]
jmp 0x422532
lea eax, [esi + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x42254b
push 0xffffffffffffffff
push 0
push dword [ebp + 0xc]
mov eax, esi
call fcn.00402b06
xor eax, eax
inc eax
mov ecx, dword [esp + 0x128]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8