Function at 0x405720
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x41f792
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
mov eax, dword [0x428990]
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x138], eax
push 0x104
lea eax, [esp + 0x38]
push eax
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00401210
mov dword [esp + 0x144], ebx
call fcn.0041631a
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x144], 1
mov eax, dword [esp + 0x18]
push 0x5c
push eax
call fcn.00409fcc
add esp, 8
cmp eax, ebx
jne 0x4057a6
or eax, 0xffffffff
jmp 0x4057aa
sub eax, dword [esp + 0x18]
inc eax
push eax
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
call fcn.00402320
push eax
mov ecx, 0x4391fc
mov byte [esp + 0x148], 2
call fcn.00401430
mov byte [esp + 0x144], 1
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4057f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ebx
jmp 0x405800
mov eax, dword [esp + 0x14c]
mov ebp, dword [eax + 4]
test ebp, ebp
je 0x405ae4
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x10]
sub eax, ebp
sar eax, 4
cmp ecx, eax
jae 0x405ae4
mov esi, dword [ebx + ebp]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
sub esi, 0x10
call dword [eax + 0x10]
mov edx, dword [esi + 0xc]
test edx, edx
lea ecx, [esi + 0xc]
jl 0x40584f
cmp eax, dword [esi]
jne 0x40584f
mov eax, esi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x405881
mov ecx, dword [esi + 4]
mov edx, dword [eax]
push 1
push ecx
mov ecx, eax
call dword [edx]
test eax, eax
je 0x405adf
mov edx, dword [esi + 4]
mov dword [eax + 4], edx
mov ecx, dword [esi + 4]
inc ecx
mov edx, ecx
shr ecx, 2
add esi, 0x10
lea edi, [eax + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, 0x10
mov dword [esp + 0x24], eax
mov byte [esp + 0x144], 3
mov esi, dword [ebx + ebp + 4]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
sub esi, 0x10
call dword [eax + 0x10]
mov ecx, dword [esi + 0xc]
test ecx, ecx
lea edx, [esi + 0xc]
jl 0x4058ba
cmp eax, dword [esi]
jne 0x4058ba
mov eax, esi
mov ecx, 1
lock xadd dword [edx], ecx
jmp 0x4058ec
mov ecx, dword [esi + 4]
mov edx, dword [eax]
push 1
push ecx
mov ecx, eax
call dword [edx]
test eax, eax
je 0x405adf
mov edx, dword [esi + 4]
mov dword [eax + 4], edx
mov ecx, dword [esi + 4]
inc ecx
mov edx, ecx
shr ecx, 2
add esi, 0x10
lea edi, [eax + 0x10]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ebx, [eax + 0x10]
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + ebp + 8]
mov edx, dword [eax + ebp + 0xc]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x18]
push 0x4391fc
push ecx
mov byte [esp + 0x150], 4
call fcn.004061f0
mov byte [esp + 0x150], 5
mov edx, dword [esp + 0x30]
push 0x4233a8
push edx
call fcn.0040a1f7
add esp, 0x14
test eax, eax
je 0x405951
push 1
push 0x4233a8
lea ecx, [esp + 0x1c]
call fcn.00402590
mov eax, dword [ebx - 0xc]
push eax
push ebx
lea ecx, [esp + 0x1c]
call fcn.00402590
mov ebp, dword [esp + 0x14]
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x405a62
mov eax, dword [ebx - 0xc]
test eax, eax
mov dword [esp + 0x2c], 0
jl 0x405a08
push 0x423400
push ebx
call fcn.0040ad6f
add esp, 8
test eax, eax
je 0x405a08
sub eax, ebx
cmp eax, 0xffffffff
je 0x405a08
push 0x423558
push ebp
or edi, 0xffffffff
call fcn.0040a2fd
mov esi, eax
add esp, 8
test esi, esi
je 0x405a04
push 2
push 0
push esi
call fcn.0040ab1e
push esi
call fcn.0040aa4e
push 0
push 0
push esi
mov edi, eax
call fcn.0040ab1e
push edi
call fcn.00417447
push esi
push edi
mov ebp, eax
push 1
push ebp
call fcn.0040a806
mov edx, edi
mov ecx, ebp
or eax, 0xffffffff
call fcn.00408570
push esi
mov edi, eax
call fcn.0040a4af
push ebp
call fcn.0041744c
mov ebp, dword [esp + 0x4c]
add esp, 0x38
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x150]
mov edx, dword [edi + 4]
test edx, edx
jne 0x405a1a
xor ecx, ecx
jmp 0x405a22
mov ecx, dword [edi + 8]
sub ecx, edx
sar ecx, 4
test edx, edx
je 0x405a52
mov eax, dword [edi + 0xc]
sub eax, edx
sar eax, 4
cmp ecx, eax
jae 0x405a52
mov eax, dword [esp + 0x20]
mov esi, dword [edi + 8]
push eax
lea ecx, [esp + 0x28]
push ecx
push 1
push esi
call fcn.00406c80
add esp, 0x10
add esi, 0x10
mov dword [edi + 8], esi
jmp 0x405a62
mov eax, dword [edi + 8]
push 1
push eax
push edi
lea ecx, [esp + 0x30]
call fcn.004066d0
lea eax, [ebp - 0x10]
mov byte [esp + 0x144], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405a84
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [ebx - 0x10]
mov byte [esp + 0x144], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405aa6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405ac4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
inc ecx
add eax, 0x10
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], eax
mov ebx, eax
jmp 0x405800
call fcn.00401960
mov byte [esp + 0x144], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov dword [esp + 0x144], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b33
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x13c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x12c]
pop ebx
call fcn.0040b25c
add esp, 0x138
ret 8