Function at 0x40ebd0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42fd31
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x43d910]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x25c], edi
mov esi, dword [ebp + 8]
lea ebx, [edi + 0x18]
push ebx
mov dword [ebp - 0x248], esi
mov dword [ebp - 0x244], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp byte [edi + 0x14], 0
jne 0x40ec38
cmp esi, 1
je 0x40f0fd
lea ecx, [ebp - 0x23c]
call fcn.0040e340
mov byte [ebp - 4], 1
cmp dword [ebp - 0x228], 8
lea eax, [ebp - 0x23c]
cmovae eax, dword [ebp - 0x23c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40ed6e
cmp dword [ebp - 0x228], 8
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 2
push 0
push 1
lea eax, [ebp - 0x23c]
cmovae eax, dword [ebp - 0x23c]
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
jne 0x40ed67
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x40ed25
cmp dword [ebp - 0x228], 8
push ecx
lea eax, [ebp - 0x23c]
cmovae eax, dword [ebp - 0x23c]
push eax
push ecx
lea ecx, [ebp - 0x224]
call fcn.0040e0f0
lea eax, [ebp - 0x224]
push 0x5c
push eax
call fcn.0041628e
add esp, 8
test eax, eax
je 0x40ed25
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x224]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
cmp dword [ebp - 0x228], 8
push 0
push 0x80
push 2
push 0
push 1
lea eax, [ebp - 0x23c]
cmovae eax, dword [ebp - 0x23c]
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
jne 0x40ed67
cmp dword [ebp - 0x228], 8
jb 0x40ed3c
push dword [ebp - 0x23c]
call fcn.00412d20
add esp, 4
xor eax, eax
push ebx
mov dword [ebp - 0x228], 7
mov dword [ebp - 0x22c], 0
mov word [ebp - 0x23c], ax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
jmp 0x40f106
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
call fcn.004131d1
mov esi, eax
add esp, 4
mov dword [ebp - 0x24c], eax
test esi, esi
je 0x40ed8c
mov dword [esi], 0
jmp 0x40ed94
xor esi, esi
mov dword [ebp - 0x24c], esi
mov byte [ebp - 4], 2
cmp dword [ebp - 0x228], 8
lea ecx, [ebp - 0x23c]
cmovae ecx, dword [ebp - 0x23c]
cmp dword [ebp - 0x248], 0
mov edx, 0x43853c
mov eax, str.wa_nC
push 0x10
cmovne eax, edx
push eax
push ecx
mov dword [ebp - 0x250], esi
call fcn.00416068
add esp, 0xc
mov dword [esi], eax
test eax, eax
je 0x40f074
mov ebx, dword [edi + 0xc]
lea eax, [edi + 0xc]
mov ebx, dword [ebx]
mov dword [ebp - 0x258], eax
lea ebx, [ebx]
cmp ebx, dword [eax]
je 0x40f06e
mov eax, dword [ebx + 0x14]
push ecx
cdq
push edx
push eax
lea ecx, [ebp - 0x278]
call fcn.0040fb30
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x40ee15
mov eax, dword [eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x40ee29
test eax, eax
je 0x40ee29
push ecx
push eax
call fcn.00415f3c
add esp, 8
cmp dword [ebp - 0x264], 0x10
jb 0x40ee40
push dword [ebp - 0x278]
call fcn.00412d20
add esp, 4
mov eax, dword [esi]
test eax, eax
je 0x40ee54
push eax
push 0x438540
call fcn.00415f3c
add esp, 8
mov eax, dword [ebx + 0x18]
push ecx
cdq
push edx
push eax
lea ecx, [ebp - 0x278]
call fcn.0040fb30
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x40ee71
mov eax, dword [eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x40ee85
test eax, eax
je 0x40ee85
push ecx
push eax
call fcn.00415f3c
add esp, 8
cmp dword [ebp - 0x264], 0x10
jb 0x40ee9c
push dword [ebp - 0x278]
call fcn.00412d20
add esp, 4
mov eax, dword [esi]
test eax, eax
je 0x40eeb0
push eax
push 0x438540
call fcn.00415f3c
add esp, 8
cmp dword [ebx + 0x30], 0x10
lea eax, [ebx + 0x1c]
jb 0x40eebb
mov eax, dword [eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x40eee3
test eax, eax
je 0x40eecf
push ecx
push eax
call fcn.00415f3c
add esp, 8
mov eax, dword [esi]
test eax, eax
je 0x40eee3
push eax
push 0x438540
call fcn.00415f3c
add esp, 8
cmp dword [ebx + 0x48], 0x10
lea eax, [ebx + 0x34]
jb 0x40eeee
mov eax, dword [eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x40ef16
test eax, eax
je 0x40ef02
push ecx
push eax
call fcn.00415f3c
add esp, 8
mov eax, dword [esi]
test eax, eax
je 0x40ef16
push eax
push 0x438540
call fcn.00415f3c
add esp, 8
cmp dword [ebx + 0x60], 0x10
lea eax, [ebx + 0x4c]
jb 0x40ef21
mov eax, dword [eax]
mov ecx, dword [esi]
test ecx, ecx
je 0x40ef49
test eax, eax
je 0x40ef35
push ecx
push eax
call fcn.00415f3c
add esp, 8
mov eax, dword [esi]
test eax, eax
je 0x40ef49
push eax
push 0x438540
call fcn.00415f3c
add esp, 8
cmp byte [ebx + 0xd], 0
mov ecx, dword [ebx + 0x14]
jne 0x40ef92
mov eax, dword [ebx + 8]
cmp byte [eax + 0xd], 0
jne 0x40ef71
mov ebx, eax
mov eax, dword [ebx]
cmp byte [eax + 0xd], 0
jne 0x40ef92
mov ebx, eax
mov eax, dword [ebx]
cmp byte [eax + 0xd], 0
je 0x40ef65
jmp 0x40ef92
mov eax, dword [ebx + 4]
cmp byte [eax + 0xd], 0
jne 0x40ef90
lea ebx, [ebx]
cmp ebx, dword [eax + 8]
jne 0x40ef90
mov ebx, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0xd], 0
je 0x40ef80
mov ebx, eax
cmp dword [ebp - 0x248], 0
lea eax, [edi + 0xc]
je 0x40edf0
lea eax, [edi + 0x18]
push eax
mov dword [ebp - 0x240], ecx
mov dword [ebp - 0x254], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x280]
push eax
lea ecx, [edi + 0xc]
mov byte [ebp - 4], 3
call fcn.0040f320
push dword [ebp - 0x254]
mov esi, dword [eax + 4]
mov edi, dword [eax]
push esi
push edi
lea ecx, [ebp - 0x240]
mov dword [ebp - 0x240], 0
call fcn.0040f6f0
mov ecx, dword [ebp - 0x258]
add esp, 0xc
lea eax, [ebp - 0x260]
push esi
push edi
push eax
call fcn.0040b730
mov edi, dword [ebp - 0x25c]
mov byte [ebp - 4], 2
lea eax, [edi + 0x18]
push eax
mov byte [edi + 0x14], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [ebp - 0x24c]
lea eax, [edi + 0xc]
jmp 0x40edf0
mov ebx, dword [ebp - 0x244]
mov eax, dword [esi]
test eax, eax
je 0x40f098
push eax
call fcn.0041557a
mov eax, dword [esi]
add esp, 4
test eax, eax
je 0x40f098
push eax
call fcn.0041571f
add esp, 4
mov dword [esi], 0
mov byte [edi + 0x14], 0
mov eax, dword [esi]
test eax, eax
je 0x40f0c0
push eax
call fcn.0041557a
mov eax, dword [esi]
add esp, 4
test eax, eax
je 0x40f0c0
push eax
call fcn.0041571f
add esp, 4
mov dword [esi], 0
push esi
call fcn.00412d20
add esp, 4
cmp dword [ebp - 0x228], 8
jb 0x40f0e0
push dword [ebp - 0x23c]
call fcn.00412d20
add esp, 4
xor eax, eax
mov dword [ebp - 0x228], 7
mov dword [ebp - 0x22c], 0
mov word [ebp - 0x23c], ax
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.00412d25
mov esp, ebp
pop ebp
ret 4