Function at 0x40a540
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48e027
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x384
mov eax, dword [0x4d1260]
xor eax, ebp
mov dword [ebp - 0x10], eax
push edi
mov dword [ebp - 0x350], ecx
lea ecx, [ebp - 0x2c]
call fcn.0040c4d0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x244]
call fcn.0040b090
mov byte [ebp - 4], 1
mov word [ebp - 0x234], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x232]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.0040afe0
mov ecx, dword [ebp + 8]
call fcn.004026c0
movzx eax, al
test eax, eax
jne 0x40a603
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x350]
call fcn.0040a480
push eax
call fcn.0040bc00
add esp, 8
movzx edx, al
test edx, edx
je 0x40a5f5
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x350]
add ecx, 0xc
call fcn.0040c5b0
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x2c]
call fcn.0040c5b0
jmp 0x40a617
mov ecx, dword [ebp - 0x350]
call fcn.0040a480
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040c5b0
lea edx, [ebp - 0x244]
push edx
mov ecx, dword [ebp - 0x350]
call fcn.0040acb0
movzx eax, al
test eax, eax
je 0x40a84c
mov dword [ebp - 0x24c], 0
mov byte [ebp - 0x245], 0
lea ecx, [ebp - 0x244]
call fcn.0040f960
cmp dword [ebp - 0x24c], eax
jae 0x40a71f
mov ecx, dword [ebp - 0x24c]
mov dword [ebp - 0x354], ecx
mov edx, dword [ebp - 0x354]
push edx
lea ecx, [ebp - 0x244]
call fcn.0040b0e0
mov dword [ebp - 0x358], eax
mov eax, dword [ebp - 0x358]
push eax
lea ecx, [ebp - 0x268]
call fcn.0040c500
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x24c]
add ecx, 1
mov dword [ebp - 0x24c], ecx
mov edx, dword [str.en_us]
push edx
lea ecx, [ebp - 0x268]
call fcn.00408f40
push eax
call fcn.00466a9c
add esp, 8
test eax, eax
jne 0x40a6cb
mov byte [ebp - 0x245], 1
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x268]
push ecx
call fcn.0040bc20
add esp, 8
movzx edx, al
test edx, edx
je 0x40a70b
lea eax, [ebp - 0x268]
push eax
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.0040c5b0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x268]
call fcn.0040c590
jmp 0x40a71f
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x268]
call fcn.0040c590
jmp 0x40a645
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.004026c0
movzx ecx, al
test ecx, ecx
je 0x40a818
mov dword [ebp - 0x24c], 0
lea ecx, [ebp - 0x244]
call fcn.0040f960
cmp dword [ebp - 0x24c], eax
jae 0x40a818
mov edx, dword [ebp - 0x24c]
mov dword [ebp - 0x35c], edx
mov eax, dword [ebp - 0x35c]
push eax
lea ecx, [ebp - 0x244]
call fcn.0040b0e0
mov dword [ebp - 0x360], eax
mov ecx, dword [ebp - 0x360]
push ecx
lea ecx, [ebp - 0x284]
call fcn.0040c500
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x24c]
add edx, 1
mov dword [ebp - 0x24c], edx
push 2
lea ecx, [ebp - 0x2c]
call fcn.00409220
push eax
lea ecx, [ebp - 0x284]
call fcn.00409220
push eax
call fcn.0047de14
add esp, 0xc
test eax, eax
jne 0x40a804
lea ecx, [ebp - 0x284]
call fcn.00409220
push eax
call fcn.00466a86
add esp, 4
cmp eax, 2
jne 0x40a804
lea eax, [ebp - 0x284]
push eax
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.0040c5b0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x284]
call fcn.0040c590
jmp 0x40a818
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x284]
call fcn.0040c590
jmp 0x40a742
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.004026c0
movzx ecx, al
test ecx, ecx
je 0x40a84c
movzx edx, byte [ebp - 0x245]
test edx, edx
je 0x40a84c
mov eax, dword [str.en_us]
push eax
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.0040c5d0
push 0x104
lea ecx, [ebp - 0x234]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
lea edx, [ebp - 0x234]
push edx
call fcn.00466a56
add esp, 8
mov word [eax], 0
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.0040b040
test eax, eax
jbe 0x40a999
push 0x4a83f8
lea ecx, [ebp - 0x2bc]
call fcn.0040c550
mov dword [ebp - 0x364], eax
mov eax, dword [ebp - 0x364]
mov dword [ebp - 0x368], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x234]
push ecx
lea ecx, [ebp - 0x2d8]
call fcn.0040c550
mov dword [ebp - 0x36c], eax
mov edx, dword [ebp - 0x36c]
mov dword [ebp - 0x370], edx
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x368]
push eax
mov ecx, dword [ebp - 0x370]
push ecx
lea edx, [ebp - 0x2f4]
push edx
call fcn.0040bc40
add esp, 0xc
mov dword [ebp - 0x374], eax
mov eax, dword [ebp - 0x374]
mov dword [ebp - 0x378], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
push ecx
mov edx, dword [ebp - 0x378]
push edx
lea eax, [ebp - 0x310]
push eax
call fcn.0040bc40
add esp, 0xc
mov dword [ebp - 0x37c], eax
mov ecx, dword [ebp - 0x37c]
mov dword [ebp - 0x380], ecx
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x380]
push edx
mov ecx, dword [ebp - 0x350]
add ecx, 0x44
call fcn.0040c5b0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x310]
call fcn.0040c590
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x2f4]
call fcn.0040c590
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2d8]
call fcn.0040c590
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2bc]
call fcn.0040c590
jmp 0x40aa80
lea ecx, [ebp - 0x2a0]
call fcn.0040c4d0
mov byte [ebp - 4], 8
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x32c]
call fcn.0040c550
mov dword [ebp - 0x384], eax
mov ecx, dword [ebp - 0x384]
mov dword [ebp - 0x388], ecx
mov byte [ebp - 4], 9
push 0x4a83fc
mov edx, dword [ebp - 0x388]
push edx
lea eax, [ebp - 0x348]
push eax
call fcn.0040cce0
add esp, 0xc
mov dword [ebp - 0x38c], eax
mov ecx, dword [ebp - 0x38c]
mov dword [ebp - 0x390], ecx
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x390]
push edx
lea ecx, [ebp - 0x2a0]
call fcn.0040c5b0
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x348]
call fcn.0040c590
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x32c]
call fcn.0040c590
lea ecx, [ebp - 0x2a0]
call fcn.00408f40
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40aa71
mov eax, dword [str.en_us]
push eax
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.0040c5d0
lea ecx, [ebp - 0x234]
push ecx
mov ecx, dword [ebp - 0x350]
add ecx, 0x44
call fcn.0040c5d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2a0]
call fcn.0040c590
mov ecx, dword [ebp - 0x350]
add ecx, 0x28
call fcn.0040b040
xor edx, edx
cmp edx, eax
sbb eax, eax
neg eax
mov byte [ebp - 0x349], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x244]
call fcn.0040b0c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.0040c590
mov al, byte [ebp - 0x349]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046521c
mov esp, ebp
pop ebp
ret 4