Function at 0x403090
Capabilities:
Check mutex on windows
Delete file
Get common file path

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419590
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x298
mov eax, dword [0x423008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x1a0]
push 0
push eax
call fcn.00405d70
add esp, 0xc
lea eax, [ebp - 0x1a0]
mov esi, str.My_GamesCaptain_blood_
push eax
push 0
push 0
push 0x8005
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
je 0x403109
int3
xor ecx, ecx
mov dword [ebp - 0x9c], ecx
cmp byte [ebp - 0x1a0], cl
je 0x403139
nop dword [eax]
cmp ecx, 0x104
jge 0x403141
inc ecx
mov dword [ebp - 0x9c], ecx
cmp byte [ebp + ecx - 0x1a0], 0
jne 0x403120
cmp ecx, 0x104
jl 0x403148
int3
test ecx, ecx
jg 0x403153
int3
lea edx, [ebp - 0x1a0]
mov al, byte [edx + ecx - 1]
cmp al, 0x5c
je 0x403192
cmp al, 0x2f
je 0x403192
mov byte [edx + ecx], 0x5c
mov eax, dword [ebp - 0x9c]
inc eax
mov dword [ebp - 0x9c], eax
cmp eax, 0x104
jl 0x403184
int3
mov byte [ebp + eax - 0x1a0], 0
mov ecx, dword [ebp - 0x9c]
cmp ecx, 0x104
jl 0x4031a1
int3
mov al, byte [esi]
inc esi
mov byte [ebp + ecx - 0x1a0], al
mov ecx, dword [ebp - 0x9c]
inc ecx
cmp byte [esi], 0
mov dword [ebp - 0x9c], ecx
jne 0x403192
cmp ecx, 0x104
jl 0x4031cc
int3
mov edi, dword [ebx + 0x10]
mov byte [ebp + ecx - 0x1a0], 0
test edi, edi
je 0x4031e8
cmp byte [edi], 0
je 0x4031e8
mov dword [str.engine.ini], edi
jmp 0x4031ee
mov edi, dword [str.engine.ini]
mov ecx, edi
test ecx, ecx
je 0x40322c
mov dl, byte [ecx]
test dl, dl
je 0x40322c
mov eax, dword [ebp - 0x9c]
cmp eax, 0x104
jae 0x40321d
inc ecx
mov byte [ebp + eax - 0x1a0], dl
inc eax
mov dl, byte [ecx]
test dl, dl
jne 0x403200
cmp eax, 0x104
jb 0x403224
int3
mov byte [ebp + eax - 0x1a0], 0
push 0xfc
lea eax, [ebp - 0x29c]
push 0
push eax
call fcn.00405d70
add esp, 0xc
mov dword [ebp - 0x2a0], 0
test edi, edi
je 0x403651
cmp byte [edi], 0
je 0x403651
xor esi, esi
nop
mov ah, byte [esi + edi]
test ah, ah
je 0x4032b1
cmp ah, 0x2e
je 0x4032b1
mov al, ah
mov cl, ah
sub al, 0x30
cmp al, 9
setbe al
sub cl, 0x41
cmp cl, 0x19
movzx edx, al
mov ecx, 1
mov al, ah
cmovbe edx, ecx
sub al, 0x61
cmp al, 0x19
movzx edx, dl
movzx eax, ah
cmovbe edx, ecx
mov ecx, 0x5f
test dl, dl
cmovne ecx, eax
mov byte [ebp + esi - 0x29c], cl
inc esi
cmp esi, 0xfc
jb 0x403260
cmp esi, 0xfc
jae 0x4032e1
mov ecx, str._mutex_for_diasable_clones.
sub ecx, esi
mov al, byte [esi + ecx]
test al, al
je 0x4032d9
mov byte [ebp + esi - 0x29c], al
inc esi
cmp esi, 0xfc
jb 0x4032c0
jmp 0x4032e1
cmp esi, 0xfc
jb 0x4032e6
mov esi, 0xfb
mov byte [ebp + esi - 0x29c], 0
cmp dword [ebp - 0x2a0], 0
jne 0x403340
lea eax, [ebp - 0x29c]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x2a0], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x403324
cmp dword [ebp - 0x2a0], 0
jne 0x403340
push 0x30
push str.Game_Captain_Blood
push str.Cant_start_more_then_one_instance._Please_close_other__before_start_new.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or esi, 0xffffffff
jmp 0x40361e
push 0x5c
lea eax, [ebp - 0x78]
push 0
push eax
call fcn.00405d70
add esp, 0xc
mov dword [ebp - 0x58], 0x420378
push str.system_log.txt
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [0x424840], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x54], xmm0
mov dword [ebp - 0x44], 0
movaps xmm0, xmmword [0x420750]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov word [ebp - 0x38], 0
mov byte [ebp - 0x36], 0
movups xmmword [ebp - 0x34], xmm0
je 0x40339d
int3
lea eax, [ebp - 0x78]
mov dword [0x424840], eax
xor eax, eax
cmp byte [str.Game_Captain_Blood], al
setne al
test eax, eax
jne 0x4033b5
int3
mov eax, dword [ebx + 8]
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x1a0]
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x60], str.Game_Captain_Blood
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.0040afe4
add esp, 4
lea ecx, [ebp - 0x78]
call fcn.00401ba0
test al, al
jne 0x40341e
push 0x10
push str.System_error__Captain_blood_
push str.Cant_create_application_window
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
or esi, 0xffffffff
jmp 0x403575
lea ecx, [ebp - 0x78]
call fcn.00402010
mov edi, dword [sym.imp.USER32.dll_PostQuitMessage]
xorps xmm0, xmm0
movups xmmword [ebp - 0x94], xmm0
mov dword [ebp - 0x7c], 0
movq qword [ebp - 0x84], xmm0
xor esi, esi
cmp byte [ebp - 0x21], 0
je 0x403467
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x403567
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
call eax
test al, al
jne 0x403567
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x4034a9
cmp dword [ebp - 0x90], 0x12
je 0x403567
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x94]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x403447
mov al, byte [ebp - 0x22]
or al, byte [ebp - 0x24]
je 0x4034fd
cmp dword [ebp - 0x54], 0
je 0x403445
cmp byte [0x424b78], 0
jne 0x403445
lea ecx, [ebp - 0x78]
mov byte [0x424b78], 1
call fcn.00402dc0
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
call eax
test al, al
je 0x4034f1
lea ecx, [ebp - 0x78]
call fcn.00401ac0
push 0
call edi
mov byte [0x424b78], 0
jmp 0x403445
test esi, esi
jle 0x40350e
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x403447
cmp dword [ebp - 0x54], 0
mov esi, 0xa
je 0x403447
cmp byte [0x424b78], 0
jne 0x403447
lea ecx, [ebp - 0x78]
mov byte [0x424b78], 1
call fcn.00402dc0
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov ecx, dword [ebp - 0x54]
mov eax, dword [ecx]
mov eax, dword [eax + 0x20]
call eax
test al, al
je 0x40355b
lea ecx, [ebp - 0x78]
call fcn.00401ac0
push 0
call edi
mov byte [0x424b78], 0
jmp 0x403447
lea ecx, [ebp - 0x78]
call fcn.00401ac0
mov esi, dword [ebp - 0x8c]
lea ecx, [ebp - 0x78]
mov dword [ebp - 4], 0
call fcn.00401ac0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40359a
push 1
push eax
call fcn.00404b59
add esp, 8
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], 0
test eax, eax
je 0x4035b3
push 1
push eax
call fcn.00404b59
add esp, 8
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], 0
test eax, eax
je 0x4035cc
push 1
push eax
call fcn.00404b59
add esp, 8
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x40], 0
test eax, eax
je 0x4035fe
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x4035f0
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x54], 0
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x403610
push 1
push eax
call fcn.00404b59
add esp, 8
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x58], vtable.CoreSystemLogReciver.0
mov eax, dword [ebp - 0x2a0]
test eax, eax
je 0x40362f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004047d8
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
push 0x42195c
lea eax, [ebp - 0x2a4]
mov dword [ebp - 0x2a4], str.Invalidate_ini_name_pointer
push eax
call fcn.00405f88
int3