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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x434757
mov eax, dword fs:[0]
push eax
sub esp, 0x8cc
mov eax, dword [0x44e018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x750], esi
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x260]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x754], eax
call fcn.0040abd0
push 1
lea ecx, [ebp - 0x258]
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x25c], 0
call fcn.0040b140
cmp byte [ebp - 0x144], 0
lea eax, [ebp - 0x254]
cmove eax, dword [ebp - 0x258]
xor ecx, ecx
mov word [eax + 4], cx
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x138]
call fcn.0040abd0
push 1
lea ecx, [ebp - 0x130]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x134], 0
call fcn.0040b140
cmp byte [ebp - 0x1c], 0
lea eax, [ebp - 0x12c]
cmove eax, dword [ebp - 0x130]
xor ecx, ecx
mov word [eax + 4], cx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x138]
mov eax, dword [esi]
push ecx
lea ecx, [ebp - 0x260]
push ecx
mov eax, dword [eax + 0x20]
mov ecx, esi
push edi
call eax
test al, al
jne 0x405732
xor bh, bh
jmp 0x405c15
cmp byte [ebp - 0x144], 0
lea eax, [ebp - 0x254]
mov bh, 1
cmove eax, dword [ebp - 0x258]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405ad7
shr eax, 4
not al
test bh, al
je 0x405ad7
cmp byte [esi + 0xd30], 0
lea ecx, [ebp - 0x8d8]
sete al
movzx eax, al
push eax
call fcn.00408aa0
mov byte [ebp - 4], 2
lea eax, [ebp - 0x254]
cmp byte [ebp - 0x144], 0
lea ecx, [ebp - 0x8d8]
cmove eax, dword [ebp - 0x258]
add eax, 4
push eax
call fcn.0040d660
cmp dword [ebp - 0x780], 0
mov ecx, dword [ebp - 0x7c0]
setne al
test ecx, ecx
mov byte [esi + 0x2419], al
setne al
mov byte [esi + 0x2418], al
test ecx, ecx
je 0x4057ea
call fcn.004065d0
mov ecx, str.initruntime_safeapi
mov bl, al
call fcn.0040a1d0
mov cl, bl
call fcn.00408520
call fcn.0040a260
mov ecx, str.initruntime_SetProcessShortName
call fcn.0040a1d0
mov eax, dword [ebp - 0x754]
mov ecx, esi
push edi
mov byte [eax], 1
call fcn.00404870
neg al
sbb al, al
and al, bh
mov byte [ebp - 0x749], al
call fcn.0040a260
xor ebx, ebx
mov dword [ebp - 0x764], fcn.0041ff0e
mov dword [ebp - 0x774], ebx
mov dword [ebp - 0x768], ebx
mov dword [ebp - 0x760], fcn.0041fc6d
mov dword [ebp - 0x75c], fcn.0041fd4b
mov byte [ebp - 4], 3
xor edi, edi
xor esi, esi
mov dword [ebp - 0x770], ebx
mov dword [ebp - 0x76c], ebx
mov dword [ebp - 0x758], edi
cmp dword [ebp - 0x848], esi
jle 0x40591f
nop dword [eax + eax]
cmp dword [ebp - 0x818], esi
jle 0x405919
lea ecx, [ebp - 0x748]
call fcn.0040abd0
lea ecx, [ebp - 0x620]
call fcn.0040abd0
lea ecx, [ebp - 0x4fc]
call fcn.0040abd0
lea ecx, [ebp - 0x3d8]
call fcn.0040abd0
push 0x54
lea eax, [ebp - 0x2b4]
push 0
push eax
call fcn.00418cc0
add esp, 0xc
mov dword [ebp - 0x624], 0xffffffff
mov byte [ebp - 4], 4
lea eax, [ebp - 0x748]
mov ecx, dword [ebp - 0x81c]
push eax
mov ecx, dword [ecx + esi*4]
call fcn.00409160
lea eax, [ebp - 0x748]
push eax
lea ecx, [ebp - 0x774]
call fcn.00409b00
mov edi, dword [ebp - 0x758]
lea ecx, [ebp - 0x748]
inc edi
mov byte [ebp - 4], 3
mov dword [ebp - 0x758], edi
call fcn.004079c0
inc esi
cmp esi, dword [ebp - 0x848]
jl 0x405870
mov ebx, dword [ebp - 0x774]
xor esi, esi
test edi, edi
jle 0x40594b
test esi, esi
js 0x405931
cmp esi, edi
jge 0x405931
mov eax, ebx
jmp 0x405933
xor eax, eax
push ecx
mov ecx, dword [ebp - 0x750]
push eax
call fcn.00406070
inc esi
add ebx, 0x4e8
cmp esi, edi
jl 0x405925
lea ecx, [ebp - 0x774]
mov byte [ebp - 4], 5
call fcn.00407830
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov byte [ebp - 4], 6
mov ebx, fcn.0041fd4b
mov ecx, dword [ebp - 0x7ac]
test ecx, ecx
je 0x405992
mov eax, dword [ebp - 0x794]
test eax, eax
push ecx
cmove eax, ebx
call eax
add esp, 4
mov dword [ebp - 0x7ac], 0
mov dword [ebp - 0x7a8], 0
mov dword [ebp - 0x7a4], 0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x7ec]
test ecx, ecx
je 0x4059e3
mov eax, dword [ebp - 0x7d4]
test eax, eax
push ecx
cmove eax, ebx
call eax
add esp, 4
mov dword [ebp - 0x7ec], 0
mov dword [ebp - 0x7e8], 0
mov dword [ebp - 0x7e4], 0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x82c]
mov dword [ebp - method.n_config::t_arraySection_class_t_configRuntimeFile::t_item_.virtual_0], vtable.n_config::t_arraySection_class_t_configRuntimeFile::t_item_.0
call fcn.004071e0
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x81c]
test ecx, ecx
je 0x405a43
mov eax, dword [ebp - 0x804]
test eax, eax
push ecx
cmove eax, ebx
call eax
add esp, 4
mov dword [ebp - 0x81c], 0
mov dword [ebp - 0x818], 0
mov dword [ebp - 0x814], 0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x874]
test ecx, ecx
je 0x405a9e
mov eax, dword [ebp - 0x85c]
test eax, eax
push ecx
cmove eax, ebx
call eax
add esp, 4
mov dword [ebp - 0x874], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x8d8]
mov dword [ebp - 0x870], 0
mov dword [ebp - 0x86c], 0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
call fcn.004028d0
mov esi, dword [ebp - 0x750]
mov bh, byte [ebp - 0x749]
cmp byte [ebp - 0x1c], 0
lea eax, [ebp - 0x12c]
cmove eax, dword [ebp - 0x130]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x405c15
shr eax, 4
not al
test al, 1
je 0x405c15
push ecx
lea ecx, [ebp - 0x860]
call fcn.00409360
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x12c]
cmp byte [ebp - 0x1c], 0
lea ecx, [ebp - 0x860]
cmove eax, dword [ebp - 0x130]
add eax, 4
push eax
call fcn.0040d660
lea eax, [esi + 0x1f90]
push eax
lea ecx, [ebp - 0x860]
call fcn.00409760
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x7b0]
mov dword [ebp - method.n_config::t_arraySection_class_t_configGameFile::t_item_.virtual_0], vtable.n_config::t_arraySection_class_t_configGameFile::t_item_.0
call fcn.004071e0
mov byte [ebp - 4], 0xd
mov esi, fcn.0041fd4b
mov ecx, dword [ebp - 0x7a0]
test ecx, ecx
je 0x405b91
mov eax, dword [ebp - 0x788]
test eax, eax
push ecx
cmove eax, esi
call eax
add esp, 4
mov dword [ebp - 0x7a0], 0
mov dword [ebp - 0x79c], 0
mov dword [ebp - 0x798], 0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0x7fc]
test ecx, ecx
je 0x405bec
mov eax, dword [ebp - 0x7e4]
test eax, eax
push ecx
cmove eax, esi
call eax
add esp, 4
mov dword [ebp - 0x7fc], 0
lea ecx, [ebp - 0x860]
mov dword [ebp - 0x7f8], 0
mov dword [ebp - 0x7f4], 0
mov dword [ebp - method.n_config::t_typeBase.virtual_0], vtable.n_config::t_typeBase.0
call fcn.004028d0
cmp byte [ebp - 0x1c], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x405c3e
mov eax, dword [ebp - 0x130]
lea ecx, [ebp - 0x12c]
cmp eax, ecx
je 0x405c3e
push eax
call fcn.0041fd4b
add esp, 4
cmp byte [ebp - 0x144], 0
mov dword [ebp - method.t_str.virtual_0], vtable.t_str.0
jne 0x405c6a
mov eax, dword [ebp - 0x258]
lea ecx, [ebp - 0x254]
cmp eax, ecx
je 0x405c6a
push eax
call fcn.0041fd4b
add esp, 4
mov al, bh
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00416855
mov esp, ebp
pop ebp
ret 8