Function at 0x40d617
Capabilities:
Check if file exists
Check mutex and terminate process on windows
Check mutex on windows
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xfd8
push esi
push edi
push 3
lea eax, [ebp - 0x38]
pop edi
push edi
push eax
call fcn.0040cbce
pop ecx
xor esi, esi
pop ecx
push esi
push 0x80
push edi
push esi
push 1
push closesocket
push dword [0x42f0d8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
jne 0x40d678
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 2
je 0x40d671
call esi
cmp eax, edi
je 0x40d671
push 4
pop eax
jmp 0x40daf0
mov eax, edi
jmp 0x40daf0
mov edi, 0xdf8
push edi
call fcn.004179b4
pop ecx
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x30]
push esi
push ecx
push edi
push eax
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40daee
cmp dword [ebp - 0x30], edi
jne 0x40daee
push ebx
push 8
pop ebx
lea eax, [ebp - 0x20]
push ebx
push dword [0x42f10c]
push eax
call fcn.00417bc0
push ebx
lea eax, [ebp - 0x10]
push dword [0x42f110]
push eax
call fcn.00417bc0
push ebx
lea eax, [ebp - 8]
push dword [0x42f114]
push eax
call fcn.00417bc0
lea eax, [ebp - 0x10]
push 1
push eax
lea eax, [ebp - 0x20]
push ebx
push eax
call fcn.0040d197
lea eax, [ebp - 8]
push esi
push eax
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.0040d197
add esp, 0x44
lea eax, [ebp - 0x20]
push 1
push eax
lea eax, [ebp - 8]
push ebx
push eax
call fcn.0040d197
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00417bc0
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.004025ef
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004025ef
lea eax, [ebp - 0x1e0]
push eax
lea eax, [ebp - 8]
push eax
call fcn.004025ef
lea eax, [ebp - 0x1e0]
push eax
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x2c]
push eax
push edi
push dword [ebp - 0x14]
call fcn.0040ce90
add esp, 0x4c
lea eax, [ebp - 0xfd8]
push edi
push dword [ebp - 0x14]
push eax
call fcn.00417bc0
lea eax, [ebp - 0x870]
push eax
call fcn.00418120
add esp, 0x10
cmp eax, esi
je 0x40d7b0
inc eax
push eax
call fcn.00418628
lea ecx, [ebp - 0x870]
mov dword [0x42f150], eax
push ecx
push eax
call fcn.00418030
add esp, 0xc
lea eax, [ebp - 0xd8c]
push 0x14
push eax
push 0x42efb8
call fcn.00417bc0
lea eax, [ebp - 0xd70]
push 0x14
push eax
push 0x42dae0
call fcn.00417bc0
lea eax, [ebp - 0xda0]
push 0x14
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00417bc0
push 0x14
lea eax, [ebp - 0xda0]
push esi
push eax
call fcn.004174b0
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0xfd8]
push edi
push eax
call fcn.0040840b
mov edi, 0x230
push edi
call fcn.004179b4
add esp, 0x40
lea ecx, [ebp - 0xfd4]
mov dword [ebp - 0x18], eax
push edi
push ecx
push eax
call fcn.00417bc0
push ebx
lea eax, [ebp - 0x20]
push dword [0x42f100]
push eax
call fcn.00417bc0
push ebx
lea eax, [ebp - 0x10]
push dword [0x42f104]
push eax
call fcn.00417bc0
push ebx
lea eax, [ebp - 8]
push dword [0x42f108]
push eax
call fcn.00417bc0
lea eax, [ebp - 8]
push esi
push eax
lea eax, [ebp - 0x20]
push ebx
push eax
call fcn.0040d197
add esp, 0x40
lea eax, [ebp - 0x20]
push esi
push eax
lea eax, [ebp - 0x10]
push ebx
push eax
call fcn.0040d197
lea eax, [ebp - 0x10]
push 1
push eax
lea eax, [ebp - 8]
push ebx
push eax
call fcn.0040d197
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00417bc0
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.004025ef
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004025ef
lea eax, [ebp - 0x1e0]
push eax
lea eax, [ebp - 8]
push eax
call fcn.004025ef
add esp, 0x44
lea eax, [ebp - 0x1e0]
push eax
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x160]
push eax
lea eax, [ebp - 0x2c]
push eax
push edi
push dword [ebp - 0x18]
call fcn.0040ce90
add edi, 0xfffffffc
lea eax, [ebp - 0xfd4]
push edi
push dword [ebp - 0x18]
push eax
call fcn.00417bc0
lea eax, [ebp - 0x38]
push ebx
push eax
lea eax, [ebp - 0xe75]
push eax
call fcn.004185f0
add esp, 0x30
test eax, eax
je 0x40d920
mov dword [0x42f0b8], 1
push dword [ebp - 0x14]
call fcn.00417985
push dword [ebp - 0x18]
call fcn.00417985
pop ecx
pop ecx
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push esi
push esi
push esi
push 0x42da98
push esi
push dword [0x42f12c]
call fcn.0040d1bf
push esi
push esi
push esi
push esi
push 0x42e46c
push esi
push dword [0x42f0c8]
call fcn.0040d1bf
mov eax, dword [ebp - 0xd78]
mov dword [0x42db88], eax
call fcn.004091b7
mov dword [0x42f160], eax
push eax
lea eax, [ebp - 0xd58]
push eax
call fcn.0041234b
add esp, 0x40
lea eax, [ebp - 0xfd4]
push edi
push eax
push dword [ebp + 8]
call fcn.00417bc0
mov edi, 0x408
push edi
call fcn.004179b4
lea ecx, [ebp - 0xc90]
push edi
push ecx
push eax
mov dword [0x42f0fc], eax
call fcn.00417bc0
lea eax, [ebp - 0xfa7]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
push eax
lea eax, [ebp - 0xf25]
mov ebx, 0x426b18
push eax
push ebx
push dword [0x42f0d0]
call edi
lea eax, [ebp - 0xfa7]
push eax
lea eax, [ebp - 0xf25]
push eax
push ebx
push dword [0x42f0cc]
call edi
mov edi, 0x42f190
lea eax, [ebp - 0xf43]
push edi
push eax
call fcn.004181a0
add esp, 0x44
test eax, eax
pop ebx
je 0x40da40
push 0x426b14
push dword [0x42f0cc]
call fcn.00418040
lea eax, [ebp - 0xf43]
push eax
push dword [0x42f0cc]
call fcn.00418040
push 0x426b10
push dword [0x42f0cc]
call fcn.00418040
add esp, 0x18
lea eax, [ebp - 0x820]
push edi
push eax
call fcn.004181a0
pop ecx
test eax, eax
pop ecx
jne 0x40da61
fld qword [ebp - 0x878]
fstp qword [0x42daa0]
jmp 0x40dab2
fld qword [ebp - 0x878]
mov edi, 0x640
mov byte [0x42f158], 1
fstp qword [0x42dad8]
push edi
call fcn.00418628
lea ecx, [ebp - 0x820]
push edi
push ecx
push eax
mov dword [0x42f154], eax
call fcn.00417bc0
add esp, 0x10
call fcn.0040d451
fst qword [0x42daa0]
fcomp qword [0x421370]
fnstsw ax
sahf
je 0x40da53
mov byte [0x42f159], 1
lea eax, [ebp - 0xfbc]
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [0x42f0b0], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40daea
call fcn.00411ce2
push str.Another_instance_of_this_program_is_already_being_run._Please_nchoose_to_try_it_or_buy_it_before_running_another_instance.
call fcn.00410576
pop ecx
push 1
call fcn.00417f53
mov al, 1
jmp 0x40daf0
mov al, 4
pop edi
pop esi
leave
ret