Function at 0x405679
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x46ae21
mov eax, dword fs:[0]
push eax
sub esp, 0x160
mov eax, dword [0x480244]
xor eax, esp
mov dword [esp + 0x158], eax
push ebx
push esi
push edi
mov eax, dword [0x480244]
xor eax, esp
push eax
lea eax, [esp + 0x170]
mov dword fs:[0], eax
and dword [esp + 0x24], 0
and dword [esp + 0x28], 0
xor ebx, ebx
mov edi, ecx
inc ebx
lea esi, [esp + 0x9c]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebx
call fcn.00404f9d
lea esi, [esp + 0x44]
call fcn.00405e66
lea esi, [edi + 0x18]
mov ecx, esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x20], esi
call fcn.00402500
test eax, eax
je 0x4058a7
lea eax, [edi + 0x24]
push eax
lea ebx, [esp + 0x48]
mov dword [esp + 0x3c], eax
call fcn.00405e79
mov eax, esi
call fcn.004025a9
test eax, eax
jne 0x405731
push dword [edi + 8]
push eax
call fcn.00406126
jmp 0x4058a7
push dword [edi + 8]
push 1
call fcn.00406126
mov esi, edi
call fcn.00405ae4
call fcn.00405ccd
test eax, eax
je 0x40575e
lea eax, [esp + 0x3c]
push eax
push edi
lea ebx, [esp + 0x38]
call fcn.00405546
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x20]
lea esi, [esp + 0x18]
call fcn.00402c14
and dword [esp + 0x178], 0
lea ecx, [esp + 0x1c]
push str.kdf.exe
push ecx
mov ecx, eax
call fcn.004016d7
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
pop ecx
pop ecx
push dword [eax]
call edi
mov esi, eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
call fcn.004023f7
or dword [esp + 0x178], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
call fcn.004023f7
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x14]
lea ebx, [esp + 0x30]
call fcn.004052c8
test esi, esi
mov dword [esp + 0x1c], eax
jne 0x40582a
push dword [esp + 0x10]
call fcn.004054dc
mov eax, dword [esp + 0x20]
lea esi, [esp + 0x40]
call fcn.00402c14
lea ecx, [esp + 0x34]
push str.kdf.exe
push ecx
mov ecx, eax
mov dword [esp + 0x180], 1
call fcn.004016d7
pop ecx
pop ecx
push dword [eax]
call edi
mov esi, eax
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
call fcn.004023f7
or dword [esp + 0x178], 0xffffffff
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
call fcn.004023f7
test esi, esi
je 0x405846
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.004053b3
mov dword [esp + 0x14], eax
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [esp + 0x20]
call fcn.00402500
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
push 0xa
pop ecx
lea edi, [esp + 0x6c]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
push dword [esi + 8]
call fcn.004025a9
neg eax
sbb al, al
inc al
lea ebx, [esp + 0x48]
push eax
call fcn.00405ed3
push dword [esp + 0x30]
push dword [esp + 0x30]
push dword [esp + 0x30]
push dword [esp + 0x28]
push dword [esp + 0x34]
push dword [esp + 0x28]
push dword [esi + 8]
call fcn.0040625b
xor eax, eax
mov ecx, dword [esp + 0x170]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x158]
xor ecx, esp
call fcn.00437538
mov esp, ebp
pop ebp
ret