Function at 0x413940
Capabilities:
Check if file exists
Check mutex on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5192b3
mov eax, dword fs:[0]
push eax
sub esp, 0xe4
mov eax, dword [0x5521f4]
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 - 0xec], esi
push 0x5432b0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
mov dword [ebp - 0xf0], edi
test edi, edi
je 0x414132
push 0x7530
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4139b1
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x414132
xor eax, eax
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x84], 0
mov bh, 1
mov dword [ebp - 0x84], 7
mov dword [ebp - 0x88], 0
mov word [ebp - 0x98], ax
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x40]
push 0x21
xorps xmm0, xmm0
mov dword [ebp - 0x48], eax
push 0x54322c
movq qword [ebp - 0x50], xmm0
mov byte [ebp - 4], al
call fcn.00416630
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 8
jb 0x413a14
mov eax, dword [eax]
push ecx
push eax
push ecx
lea ecx, [ebp - 0x50]
call fcn.0042d840
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x413a38
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00406490
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea ecx, [ebp - 0x50]
lea eax, [ebp - 0x98]
mov dword [ebp - 0x30], 0
push eax
push str.a12_date
mov byte [ebp - 4], 4
call fcn.0042d910
lea ecx, [ebp - 0xb0]
call fcn.00410e10
add esi, 0x2bc
mov byte [ebp - 4], 6
cmp dword [esi + 0x14], 8
jb 0x413a83
mov eax, dword [esi]
jmp 0x413a85
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x413d7c
cmp dword [ebp - 0x9c], 8
lea eax, [ebp - 0xb0]
push dword [ebp - 0xa0]
cmovae eax, dword [ebp - 0xb0]
lea ecx, [ebp - 0x98]
cmp dword [ebp - 0x84], 8
mov edx, dword [ebp - 0x88]
cmovae ecx, dword [ebp - 0x98]
push eax
call fcn.00415200
add esp, 8
test eax, eax
jne 0x413add
xor bl, bl
jmp 0x413e2b
mov edx, esi
lea ecx, [ebp - 0x28]
call fcn.004175a0
sub esp, 8
mov byte [ebp - 4], 7
cmp dword [eax + 0x14], 0x10
mov edx, esp
jb 0x413afa
mov ecx, dword [eax]
jmp 0x413afc
mov ecx, eax
mov dword [edx], ecx
lea ecx, [ebp - 0x40]
mov eax, dword [eax + 0x10]
mov dword [edx + 4], eax
call fcn.0042d280
add esp, 8
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x413b28
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004023a0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], 0
mov byte [ebp - 0x68], 0
push 0x33
push 0x543320
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 0xa
call fcn.004166f0
mov edx, eax
mov byte [ebp - 4], 0xb
cmp dword [edx + 0x14], 0x10
jb 0x413b7e
mov edx, dword [edx]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp byte [edx], 0
jne 0x413ba7
xor ecx, ecx
jmp 0x413bb9
mov ecx, edx
lea ebx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x413bb0
sub ecx, ebx
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00405b30
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x28]
call fcn.00417770
mov byte [ebp - 4], 0xb
add esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x413bef
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004023a0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
mov byte [ebp - 4], 0xd
mov eax, dword [ebp - 0xc0]
cmp eax, 0x10
jb 0x413c23
inc eax
lea ecx, [ebp - 0xd4]
push eax
push dword [ebp - 0xd4]
call fcn.004023a0
mov dword [ebp - 0xc0], 0xf
lea eax, [ebp - 0x68]
mov dword [ebp - 0xc4], 0
sub esp, 8
mov byte [ebp - 0xd4], 0
mov ecx, esp
mov byte [ebp - 4], 0xa
cmp dword [ebp - 0x54], 0x10
cmovae eax, dword [ebp - 0x68]
mov dword [ecx], eax
mov eax, dword [ebp - 0x58]
mov dword [ecx + 4], eax
lea ecx, [ebp - 0xd4]
call fcn.0042d280
add esp, 8
mov ebx, eax
lea eax, [ebp - 0x68]
mov byte [ebp - 4], 0xe
cmp eax, ebx
je 0x413ca5
mov eax, dword [ebp - 0x54]
cmp eax, 0x10
jb 0x413c8a
inc eax
lea ecx, [ebp - 0x68]
push eax
push dword [ebp - 0x68]
call fcn.004023a0
push ebx
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], 0
mov byte [ebp - 0x68], 0
call fcn.00405f90
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0xc0]
cmp eax, 0x10
jb 0x413cc7
inc eax
lea ecx, [ebp - 0xd4]
push eax
push dword [ebp - 0xd4]
call fcn.004023a0
cmp dword [ebp - 0x54], 0x10
lea edx, [ebp - 0x68]
mov ebx, dword [ebp - 0x58]
lea ecx, [ebp - 0x40]
cmovae edx, dword [ebp - 0x68]
mov eax, ebx
cmp dword [ebp - 0x2c], 0x10
mov dword [ebp - 0xc0], 0xf
cmovae ecx, dword [ebp - 0x40]
cmp dword [ebp - 0x30], ebx
mov dword [ebp - 0xc4], 0
cmovb eax, dword [ebp - 0x30]
push eax
mov byte [ebp - 0xd4], 0
call fcn.00401a10
add esp, 4
test eax, eax
jne 0x413d21
mov eax, dword [ebp - 0x30]
cmp ebx, eax
jbe 0x413d1d
or eax, 0xffffffff
jmp 0x413d21
sbb eax, eax
neg eax
test eax, eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x54]
setne bh
cmp eax, 0x10
jb 0x413d3f
inc eax
lea ecx, [ebp - 0x68]
push eax
push dword [ebp - 0x68]
call fcn.004023a0
mov dword [ebp - 0x54], 0xf
mov dword [ebp - 0x58], 0
mov byte [ebp - 0x68], 0
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x413d6a
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.004023a0
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
xor bl, bl
test bh, bh
je 0x413e2b
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], bl
push 0x2f
push 0x543280
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xf
call fcn.004166f0
mov byte [ebp - 4], 0x10
cmp dword [eax + 0x14], 0x10
jb 0x413dc4
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0xd4]
call fcn.004059a0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0xd4]
call fcn.00417770
add esp, 4
mov byte [ebp - 4], 0x10
lea ecx, [ebp - 0xd4]
mov bl, al
call fcn.00402210
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0xf
call fcn.00402210
test bl, bl
je 0x413e1f
cmp dword [ebp - 0x2c], 0x10
lea edx, [ebp - 0x40]
push dword [ebp - 0x30]
cmovae edx, dword [ebp - 0x40]
mov ecx, esi
call fcn.00424a90
add esp, 4
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 6
call fcn.00402210
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x6c], 0xf
mov dword [ebp - 0x70], 0
mov byte [ebp - 0x80], 0
push 0xffffffffffffffff
lea edx, [ebp - 0x80]
mov byte [ebp - 4], 0x12
mov ecx, esi
call fcn.00423420
mov esi, dword [0x51cd28]
add esp, 4
test al, al
jne 0x413e77
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 0x50]
jmp 0x41405a
test bl, bl
je 0x413e9d
cmp dword [ebp - 0x9c], 8
lea eax, [ebp - 0xb0]
lea ecx, [ebp - 0x50]
cmovae eax, dword [ebp - 0xb0]
push eax
push str.a12_date
call fcn.0042da70
mov ebx, dword [ebp - 0x50]
test ebx, ebx
je 0x413eaf
push ebx
call esi
xor ebx, ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
lea edx, [ebp - 0x80]
lea ecx, [ebp - 0xd4]
call fcn.00417d60
push eax
lea ecx, [ebp - 0x80]
mov byte [ebp - 4], 0x13
call fcn.00405910
lea ecx, [ebp - 0xd4]
mov byte [ebp - 4], 0x12
call fcn.00402210
cmp dword [ebp - 0x6c], 0x10
lea eax, [ebp - 0x80]
push ecx
cmovae eax, dword [ebp - 0x80]
lea ecx, [ebp - 0xe8]
mov dword [ebp - 0xbc], eax
xorps xmm0, xmm0
mov eax, dword [ebp - 0x70]
mov esi, esp
mov dword [ebp - 0xb8], eax
lea eax, [ebp - 0xbc]
mov dword [ebp - 0xb4], esp
push eax
movups xmmword [ebp - 0xe8], xmm0
mov dword [ebp - 0xc8], 0
movups xmmword [ebp - 0xd8], xmm0
mov dword [ebp - 0xc4], 0
mov dword [ebp - 0xc0], 0
call fcn.004336f0
mov dword [esi], eax
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 0x12
call fcn.0042baf0
add esp, 4
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x414031
mov edi, dword [eax + 0xc]
xor esi, esi
sub edi, dword [eax + 8]
sar edi, 2
test edi, edi
je 0x414029
mov ebx, dword [ebp - 0xec]
nop word [eax + eax]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
mov byte [ebp - 4], 0x16
mov ecx, dword [ebp - 0x44]
mov eax, dword [ecx + 0xc]
sub eax, dword [ecx + 8]
sar eax, 2
cmp esi, eax
jae 0x413ff2
mov eax, dword [ecx + 8]
lea edx, [ebp - 0x28]
push edx
mov ecx, dword [eax + esi*4]
mov eax, dword [ecx]
mov eax, dword [eax + 0x18]
call eax
test al, al
je 0x413ff2
cmp dword [ebp - 0x18], 0
je 0x413ff2
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0xbc]
push eax
lea ecx, [ebx + 0x2d4]
call fcn.00415390
mov eax, dword [ebp - 0xbc]
mov dword [eax + 0x28], 1
mov byte [ebp - 4], 0x15
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x41400b
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004023a0
inc esi
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp esi, edi
jb 0x413f80
mov ebx, dword [ebp - 0x50]
push dword [ebp - 0xf0]
jmp 0x414032
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov byte [ebp - 4], 0x18
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x44], 0
test ecx, ecx
je 0x414050
mov eax, dword [ecx]
push 1
call dword [eax]
mov byte [ebp - 4], 0x12
mov esi, dword [0x51cd28]
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x6c]
cmp eax, 0x10
jb 0x414073
inc eax
lea ecx, [ebp - 0x80]
push eax
push dword [ebp - 0x80]
call fcn.004023a0
mov dword [ebp - 0x6c], 0xf
mov dword [ebp - 0x70], 0
mov byte [ebp - 0x80], 0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x9c]
cmp eax, 8
jb 0x4140a7
inc eax
lea ecx, [ebp - 0xb0]
push eax
push dword [ebp - 0xb0]
call fcn.00406490
xor eax, eax
mov dword [ebp - 0x9c], 7
mov dword [ebp - 0xa0], 0
mov word [ebp - 0xb0], ax
mov byte [ebp - 4], al
test ebx, ebx
je 0x4140dc
push ebx
call esi
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x48], 0
test ecx, ecx
je 0x4140f0
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x84]
cmp eax, 8
jb 0x414115
inc eax
lea ecx, [ebp - 0x98]
push eax
push dword [ebp - 0x98]
call fcn.00406490
xor eax, eax
mov dword [ebp - 0x84], 7
mov dword [ebp - 0x88], 0
mov word [ebp - 0x98], ax
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.00497eb9
mov esp, ebp
pop ebp
ret