Function at 0x4030c0
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Get file size
Read file on windows
Terminate process

Disassembly:
sub esp, 0x140
push ebx
push ebp
push esi
push edi
push str.cefaddfdfd
push 0
mov dword [esp + 0x24], ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4030f2
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x4c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
call fcn.004046d0
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x28]
push ebx
call fcn.00404b70
test al, al
je 0x40316e
mov edi, dword [esp + 0x28]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x4c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call fcn.00404b50
mov eax, dword [0x40c24c]
push 1
push eax
lea eax, [esp + 0x1b]
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x1f], 0x5c
call fcn.00404650
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x3c], cl
lea ecx, [esp + 0x3c]
mov esi, eax
call fcn.004046d0
push esi
lea edx, [esp + 0x28]
push 0
push edx
lea ecx, [esp + 0x44]
call fcn.00404450
mov eax, dword [0x40c24c]
lea ecx, [esp + 0x38]
push eax
push 0
push ecx
lea ecx, [esp + 0x30]
call fcn.00404450
push 1
lea ecx, [esp + 0x3c]
call fcn.004046d0
mov edi, str.cfg.ini
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x40c24c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [esp + 0x2c]
sub edx, ecx
cmp edx, esi
ja 0x4031f6
call fcn.00405f0b
test esi, esi
jbe 0x40323b
mov eax, dword [esp + 0x2c]
push 0
lea ecx, [esp + 0x28]
lea ebx, [eax + esi]
push ebx
call fcn.00404b70
test al, al
je 0x40323b
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov ecx, esi
mov esi, str.cfg.ini
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x28]
call fcn.00404b50
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x403248
mov eax, 0x40c248
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x403280
push 1
lea ecx, [esp + 0x28]
call fcn.004046d0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0x3e8
mov dword [esp + 0x34], ebx
jae 0x4032af
push 1
lea ecx, [esp + 0x28]
call fcn.004046d0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret
lea edi, [ebx + 1]
push edi
call fcn.004065d3
mov ecx, edi
mov ebp, eax
mov edx, ecx
xor eax, eax
mov edi, ebp
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [esp + 0x4c]
push eax
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp]
add ebx, 0xfffffffc
cmp esi, ebx
mov dword [esp + 0x14], esi
jbe 0x40330e
push 1
lea ecx, [esp + 0x28]
call fcn.004046d0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret
push esi
call fcn.004065d3
mov ecx, esi
mov ebx, eax
mov edx, ecx
lea esi, [ebp + 4]
mov edi, ebx
mov eax, dword [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
push 0x6f
push eax
push ebx
mov ecx, esi
call fcn.00403090
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add esi, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov edi, ecx
mov ecx, esi
push edi
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], edi
call fcn.00404b70
test al, al
je 0x403391
mov eax, dword [esp + 0x18]
mov ecx, edi
mov edx, ecx
mov esi, ebx
mov edi, dword [eax + 4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
mov ecx, edx
mov dword [eax + 8], ecx
mov eax, dword [eax + 4]
mov byte [eax + ecx], 0
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x3c], cl
lea ecx, [esp + 0x3c]
call fcn.004046d0
push 3
push 0
push esi
lea ecx, [esp + 0x44]
call fcn.00404450
mov edx, dword [0x40c24c]
lea eax, [esp + 0x38]
push edx
push 0
push eax
mov ecx, esi
call fcn.00404450
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4033ec
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4033e3
cmp al, 0xff
je 0x4033e3
dec al
mov byte [ecx], al
jmp 0x4033ec
push ecx
call fcn.00405f00
add esp, 4
push ebx
call fcn.00405f00
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x38]
add esp, 4
mov esi, dword [ecx + ebp + 4]
lea ebx, [ecx + 4]
add ebx, 4
mov dword [esp + 0x14], esi
sub edx, ebx
cmp esi, edx
jbe 0x403442
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x403676
mov al, byte [ecx - 1]
test al, al
je 0x40366c
cmp al, 0xff
je 0x40366c
dec al
pop edi
pop esi
mov byte [ecx - 1], al
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret
push esi
call fcn.004065d3
mov ecx, esi
lea esi, [ebx + ebp]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x18], eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
push 0x6f
push ecx
push eax
mov ecx, esi
call fcn.00403090
lea edx, [esi + 0x3c]
mov esi, dword [esp + 0x18]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov ecx, edx
push edi
mov dword [esp + 0x28], edi
call fcn.00404b70
test al, al
je 0x4034c8
mov edx, dword [esp + 0x1c]
mov ecx, edi
mov edi, dword [edx + 0x40]
lea eax, [edx + 0x3c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
mov ecx, edx
mov dword [eax + 8], ecx
mov eax, dword [eax + 4]
mov byte [eax + ecx], 0
push esi
call fcn.00405f00
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x38]
add ebx, eax
add esp, 4
mov esi, dword [ebx + ebp]
add ebx, 4
sub ecx, ebx
mov dword [esp + 0x14], esi
cmp esi, ecx
ja 0x403411
push esi
call fcn.004065d3
mov ecx, esi
lea esi, [ebx + ebp]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x18], eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
mov ecx, edx
push 0x6f
push ecx
push eax
mov ecx, esi
call fcn.00403090
lea edx, [esi + 0x1c]
mov esi, dword [esp + 0x18]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov ecx, edx
push edi
mov dword [esp + 0x28], edi
call fcn.00404b70
test al, al
je 0x403573
mov edx, dword [esp + 0x1c]
mov ecx, edi
mov edi, dword [edx + 0x20]
lea eax, [edx + 0x1c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x18]
mov ecx, edx
mov dword [eax + 8], ecx
mov eax, dword [eax + 4]
mov byte [eax + ecx], 0
push esi
call fcn.00405f00
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x38]
add ebx, eax
add esp, 4
mov esi, dword [ebx + ebp]
add ebx, 4
sub ecx, ebx
mov dword [esp + 0x14], esi
cmp esi, ecx
ja 0x403647
push esi
call fcn.004065d3
mov ecx, esi
lea esi, [ebx + ebp]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x18], eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
mov ecx, edx
push 0x6f
push ecx
push eax
mov ecx, esi
call fcn.00403090
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esi + 0x2c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov edi, ecx
mov ecx, edx
push edi
mov dword [esp + 0x28], edi
call fcn.00404b70
test al, al
je 0x403620
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov ecx, edi
mov edi, dword [edx + 0x30]
lea eax, [edx + 0x2c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
mov ecx, edx
mov dword [eax + 8], ecx
mov eax, dword [eax + 4]
mov byte [eax + ecx], 0
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00405f00
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x38]
add ebx, ecx
add esp, 4
mov edi, dword [ebx + ebp]
add ebx, 4
sub eax, ebx
mov dword [esp + 0x14], edi
cmp edi, eax
jbe 0x403683
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x403676
mov al, byte [ecx - 1]
test al, al
je 0x40366c
cmp al, 0xff
je 0x40366c
dec al
pop edi
pop esi
mov byte [ecx - 1], al
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret
dec ecx
push ecx
call fcn.00405f00
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x140
ret
push edi
call fcn.004065d3
mov ecx, edi
mov dword [esi + 0x4c], eax
mov edx, ecx
lea esi, [ebx + ebp]
mov edi, eax
add esp, 4
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x98
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
push edi
mov ecx, esi
mov eax, dword [esi + 0x4c]
push eax
call fcn.00403090
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x50], edi
test ecx, ecx
je 0x4036f2
mov al, byte [ecx - 1]
test al, al
je 0x4036e8
cmp al, 0xff
je 0x4036e8
dec al
pop edi
pop esi
mov byte [ecx - 1], al
pop ebp
mov eax, 1
pop ebx
add esp, 0x140
ret
dec ecx
push ecx
call fcn.00405f00
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x140
ret