Function at 0x401270
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x4d4
lea eax, [ebp - 0x18]
mov ebx, dword [ebp + 8]
mov esi, edx
mov dword [eax - 4], esp
or dword [eax + 8], 0xffffffff
mov dword [eax + 4], 0x500ee0
mov edx, dword fs:[0]
test ebx, ebx
mov dword [eax], edx
mov dword fs:[0], eax
je 0x4013bd
mov dword [ebp - 0x3c], ecx
js 0x401595
mov al, byte [0x5c3018]
xor ecx, ecx
mov edx, ebx
call fcn.004e33d0
test eax, eax
je 0x40159a
push ebx
push esi
mov dword [ebp - 0x24], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov al, byte [0x5c3018]
xor ecx, ecx
mov edx, ebx
call fcn.004e33d0
test eax, eax
je 0x4015a4
mov edi, eax
push ebx
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea ecx, [ebp - 0x298]
mov dword [ebp - 0x10], 5
mov edx, 0x57ecb0
mov dword [ecx], ebx
mov dword [ecx + 4], edi
mov dword [ecx + 8], ebx
mov byte [ecx + 0xc], 0
push 1
call fcn.004d5060
pop eax
mov eax, dword [ebp - 0x298]
mov edx, dword [ebp - 0x294]
mov esi, dword [ebp - 0x290]
mov byte [ebp - 0x1e], 1
mov dword [ebp - 0x10], 1
lea ecx, [ebp - 0x4e0]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
push esi
call fcn.004d1b70
pop eax
mov eax, dword [ebp - 0x4e0]
mov ebx, dword [ebp - 0x4dc]
mov esi, dword [ebp - 0x4d8]
cmp eax, 0x80000000
je 0x401396
lea edx, [ebp - 0x298]
mov byte [ebp - 0x1e], 1
lea ecx, [ebp - 0x48]
mov dword [edx], eax
mov dword [edx + 4], ebx
mov dword [edx + 8], esi
push 1
call fcn.004d3ad0
pop eax
mov ebx, dword [ebp - 0x48]
cmp ebx, 0x80000000
jne 0x4013ea
mov ebx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x40]
mov edi, ebx
shrd edi, esi, 8
cmp dword [ebp - 0x30], 0
je 0x4013ad
mov ecx, dword [ebp - 0x2c]
xor edx, edx
inc edx
call fcn.004332a0
mov ecx, dword [ebp - 0x24]
xor edx, edx
inc edx
call fcn.004332a0
mov ecx, dword [ebp - 0x3c]
jmp 0x4013c2
push 3
pop esi
xor ebx, ebx
shl edi, 8
movzx eax, bl
mov dword [ecx + 8], esi
or eax, edi
mov dword [ecx + 4], eax
mov dword [ecx], 2
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x4d4
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [ebp - 0x44]
push 0x250
push 0
lea esi, [ebp - 0x298]
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push esi
push edi
call dword [sym.imp.kernel32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x4014aa
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], eax
mov al, byte [0x5c3018]
push 0x18
pop edx
xor ecx, ecx
call fcn.004e33d0
mov ecx, dword [ebp + 8]
test eax, eax
je 0x4015b8
mov esi, eax
xor eax, eax
inc eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 8], ecx
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], ecx
mov byte [esi + 0x14], 0
lea eax, [ebp - 0x290]
mov ebx, dword [eax - 8]
mov ecx, dword [eax - 4]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], ebx
push 0x248
push eax
lea eax, [ebp - 0x4e0]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x34], 0
je 0x401485
push 2
pop edx
mov ecx, edi
call fcn.004332a0
mov edx, dword [ebp - 0x24]
shrd ebx, edx, 8
cmp dword [ebp - 0x30], 0
je 0x40151c
mov ecx, dword [ebp - 0x2c]
xor edi, edi
inc edi
mov edx, edi
call fcn.004332a0
mov edx, dword [ebp - 0x24]
mov ecx, edi
jmp 0x40151f
mov dword [ebp - 0x28], edi
call dword [sym.imp.kernel32.dll_GetLastError]
mov edi, dword [ebp + 8]
cmp eax, 2
jne 0x401561
mov al, byte [0x5c3018]
push 0x18
pop edx
xor ecx, ecx
call fcn.004e33d0
test eax, eax
je 0x4015cf
mov ecx, dword [ebp - 0x24]
mov esi, eax
xor eax, eax
inc eax
test ebx, ebx
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], edi
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], edi
mov byte [esi + 0x14], 0
je 0x4014ff
push 2
pop edx
mov ecx, dword [ebp - 0x28]
call fcn.004332a0
xor ecx, ecx
xor eax, eax
dec eax
cmp dword [ebp - 0x30], 0
mov dword [ebp - 0x38], eax
je 0x40151a
mov ecx, dword [ebp - 0x2c]
xor edx, edx
inc edx
call fcn.004332a0
xor ecx, ecx
jmp 0x401522
xor ecx, ecx
inc ecx
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x3c]
shl ebx, 8
movzx eax, al
or eax, ebx
mov dword [edi], ecx
mov dword [edi + 4], eax
mov dword [edi + 8], edx
lea eax, [edi + 0xc]
push 0x248
lea ecx, [ebp - 0x4e0]
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0x38]
mov dword [edi + 0x254], esi
mov dword [edi + 0x258], eax
jmp 0x4013d6
mov esi, eax
test ebx, ebx
je 0x401572
push 2
pop edx
mov ecx, dword [ebp - 0x28]
call fcn.004332a0
cmp dword [ebp - 0x30], 0
je 0x401583
mov ecx, dword [ebp - 0x2c]
xor edx, edx
inc edx
call fcn.004332a0
mov ecx, dword [ebp - 0x24]
xor edx, edx
inc edx
call fcn.004332a0
xor ebx, ebx
jmp 0x4013b8
call fcn.00420080
xor ecx, ecx
mov edx, ebx
inc ecx
call fcn.00526660
and dword [ebp - 0x10], 0
xor ecx, ecx
mov edx, ebx
mov byte [ebp - 0x1d], 1
inc ecx
call fcn.00526660
jmp 0x4015e4
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x10], 4
push 4
pop ecx
push 0x18
pop edx
call fcn.00526680
jmp 0x4015e4
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x10], 3
push 4
pop ecx
push 0x18
pop edx
call fcn.00526680
ud2