Function at 0x403a60
Capabilities:
Check mutex on windows
Get common file path
Get file size
Read .ini file
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x416d46
mov eax, dword fs:[0]
push eax
sub esp, 0x4ec
mov eax, dword [0x41f4c8]
xor eax, esp
mov dword [esp + 0x4e8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41f4c8]
xor eax, esp
push eax
lea eax, [esp + 0x500]
mov dword fs:[0], eax
lea ecx, [esp + 0x16c]
call fcn.00403960
lea eax, [esp + 0x3f8]
push eax
xor esi, esi
push 0x104
mov dword [esp + 0x510], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [esp + 0x3f8]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403ad0
sub eax, edx
cmp eax, 3
jne 0x403ae5
mov byte [esp + 0x3fa], cl
lea ecx, [esp + 0x3f8]
push ecx
push str._sMENU.INI
push 0x42a378
call fcn.004048de
mov eax, 0x42a378
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403b07
sub eax, edx
xor ecx, ecx
cmp eax, esi
jle 0x403b43
mov bl, 0x2d
jmp 0x403b20
mov dl, byte [ecx + 0x42a378]
cmp dl, 0x5c
je 0x403b38
cmp dl, 0x2f
je 0x403b38
mov byte [ecx + 0x42a270], dl
jmp 0x403b3e
mov byte [ecx + 0x42a270], bl
inc ecx
cmp ecx, eax
jl 0x403b20
push 0x42a270
push 1
push esi
mov byte [eax + 0x42a270], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push esi
push eax
mov dword [0x42a268], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x403bcc
mov edx, dword [0x42a268]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x1c]
push eax
push esi
push 0x42a270
call fcn.00401180
add esp, 0xc
mov eax, dword [esp + 0x178]
cmp eax, esi
je 0x403ba0
push eax
call fcn.00405b98
add esp, 4
mov ecx, dword [esp + 0x16c]
push ecx
mov dword [esp + 0x17c], esi
mov dword [esp + 0x180], esi
mov dword [esp + 0x184], esi
call fcn.00405b98
add esp, 4
xor eax, eax
jmp 0x4044be
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push 0x42a378
push 0x32
push 0x42a78c
push 0x4172e3
push str.TITLE
push str.SYSTEM
call ebp
push 0x42a378
push 0x80
lea edx, [esp + 0x23c]
push edx
push 0x4172e3
push str.HELP_PATH
push str.SYSTEM
call ebp
mov edx, 0x42e518
lea eax, [esp + 0x234]
sub edx, eax
mov edi, 0xa
jmp 0x403c30
lea eax, [esp + 0x234]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403c37
add edx, 0x3e54
sub edi, 1
jne 0x403c30
push 0x42a378
push 0x80
lea ecx, [esp + 0x23c]
push ecx
push 0x4172e3
push str.backcolor
push str.SYSTEM
call ebp
lea edi, [esp + 0x40]
lea eax, [esp + 0x234]
call fcn.00401820
movzx eax, byte [esp + 0x48]
movzx edx, byte [esp + 0x44]
movzx ecx, byte [esp + 0x40]
shl eax, 8
or eax, edx
shl eax, 8
or eax, ecx
push eax
mov dword [0x453310], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov esi, 0x7ba4
lea edx, [esp + 0x234]
xor edi, edi
mov ebx, 0x42a7c8
sub esi, edx
mov dword [0x453314], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], esi
jmp 0x403ccc
mov esi, dword [esp + 0x30]
lea eax, [edi + 1]
push eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c8]
push str.MENU__d
push eax
call fcn.004048de
add esp, 0xc
push 0x42a378
push 0x10
lea ecx, [esp + 0x1dc]
push ecx
push 0x4172e3
push str.FILE
lea edx, [esp + 0x1d8]
push edx
call ebp
cmp byte [esp + 0x1d4], 0
jne 0x403d34
xor eax, eax
jmp 0x403d20
mov cl, byte [eax + 0x42a378]
mov byte [esp + eax + 0x2b4], cl
inc eax
test cl, cl
jne 0x403d20
jmp 0x403d72
lea eax, [esp + 0x1d4]
push eax
lea ecx, [esp + 0x3fc]
push ecx
lea edx, [esp + 0x2bc]
push str._s_s
push edx
call fcn.004048de
mov eax, dword [0x417720]
mov cl, byte [0x417724]
add esp, 0x10
mov dword [esp + 0x1c4], eax
mov byte [esp + 0x1c8], cl
lea edx, [esp + 0x2b4]
push edx
push 0x28
push ebx
push 0x4172e3
push str.TITLE
lea eax, [esp + 0x1d8]
push eax
call ebp
cmp byte [ebx], 0
je 0x404045
lea ecx, [esp + 0x2b4]
push ecx
push 0x40
lea edx, [esp + 0x3c0]
push edx
push 0x4172e3
push str.PATH
lea eax, [esp + 0x1d8]
push eax
call ebp
lea ecx, [esp + 0x2b4]
push ecx
push 0
push str.ICON
lea edx, [esp + 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2b4]
push eax
push 0x80
lea ecx, [esp + 0x23c]
push ecx
push 0x41770c
push str.HELP_PATH
lea edx, [esp + 0x1d8]
push edx
call ebp
push 2
lea eax, [esp + 0x238]
push 0x41770c
push eax
call fcn.00404cfb
add esp, 0xc
test eax, eax
je 0x403e3a
lea eax, [esp + 0x234]
lea edx, [esi + ebx]
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403e30
mov dword [esp + 0x18], 0
mov edi, 1
lea esi, [ebx + 0x30]
jmp 0x403e54
mov ebx, dword [esp + 0x14]
push edi
lea ecx, [esp + 0x1f8]
push str.EXE__d
push ecx
call fcn.004048de
push edi
lea edx, [esp + 0x1f4]
push str.TITLE__d
push edx
call fcn.004048de
push edi
lea eax, [esp + 0x240]
push str.PATH__d
push eax
call fcn.004048de
push edi
lea ecx, [esp + 0x23c]
push str.ICON__d
push ecx
call fcn.004048de
push edi
lea edx, [esp + 0x238]
push str.CMD__d
push edx
call fcn.004048de
add esp, 0x3c
lea eax, [esp + 0x2b4]
push eax
push 0x28
push esi
push 0x4172e3
lea ecx, [esp + 0x1f4]
push ecx
lea edx, [esp + 0x1d8]
push edx
call ebp
cmp byte [esi], 0
je 0x404024
lea eax, [esp + 0x2b4]
push eax
push 0x40
lea ebx, [esi + 0x2a]
push ebx
push 0x4172e3
lea ecx, [esp + 0x204]
push ecx
lea edx, [esp + 0x1d8]
push edx
call ebp
cmp byte [ebx], 0
je 0x404020
lea eax, [esp + 0x2b4]
push eax
push 0x40
lea ecx, [esi + 0x12e]
push ecx
lea edx, [esp + 0x3c4]
push edx
lea eax, [esp + 0x234]
push eax
lea ecx, [esp + 0x1d8]
push ecx
call ebp
lea edx, [esp + 0x2b4]
push edx
push 0x40
lea eax, [esi + 0x232]
push eax
push 0
lea eax, [esp + 0x214]
push eax
lea ecx, [esp + 0x1d8]
push ecx
call ebp
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x2b4]
push edx
push eax
lea ecx, [esp + 0x21c]
push ecx
lea edx, [esp + 0x1d0]
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [esi + 0x278], eax
xor eax, eax
push ebx
mov dword [esi + 0x27c], eax
mov dword [esi + 0x280], eax
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionA]
test eax, eax
je 0x40400c
mov ebx, dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
push 3
push 0x4176dc
inc eax
push eax
call ebx
test eax, eax
jne 0x40400c
push 5
push str.SETUP
lea eax, [esi + 0x232]
push eax
call ebx
test eax, eax
jne 0x40400c
push 7
mov dword [esi + 0x284], eax
push str._NOCOPY
lea eax, [esi + 0x237]
push eax
mov dword [esi + 0x280], 1
call ebx
test eax, eax
jne 0x40400c
lea ecx, [esi + 0x23f]
push ecx
lea edx, [esi + 0x288]
push edx
mov dword [esi + 0x284], 1
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
inc dword [esp + 0x18]
inc edi
add esi, 0x28c
cmp edi, 0x19
jl 0x403e50
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov dword [ebx + 0x2c], eax
add ebx, 0x3e54
cmp ebx, 0x451710
mov dword [esp + 0x14], ebx
jl 0x403cc8
push 0x42a378
push 0x80
lea ecx, [esp + 0x23c]
push ecx
push str._1__1
push 0x41749c
push str.WORK
mov esi, 0xa
mov dword [0x42a77c], edi
call ebp
mov edi, 0x42a780
lea eax, [esp + 0x234]
call fcn.00401820
mov eax, dword [0x42a780]
test eax, eax
jge 0x404098
cmp eax, 0xffffffff
je 0x404098
mov dword [0x42a780], esi
mov eax, dword [0x42a784]
test eax, eax
jge 0x4040ac
cmp eax, 0xffffffff
je 0x4040ac
mov dword [0x42a784], esi
push 0
push 0
push 0
push 0x417398
call dword [sym.imp.GDI32.dll_CreateICA]
mov ebx, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edi, eax
push 8
push edi
call ebx
push esi
push edi
mov dword [0x42a54c], eax
call ebx
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x4e
mov dword [0x42a47c], eax
call edi
push 0x4f
mov dword [0x451c24], eax
call edi
mov edx, dword [0x451c24]
add edx, 0xffffff38
cmp dword [0x42a780], edx
mov dword [0x451c28], eax
jle 0x40410a
mov dword [0x42a780], esi
add eax, 0xffffff38
cmp dword [0x42a784], eax
jle 0x40411d
mov dword [0x42a784], esi
push 0x42a378
push esi
push str.menu_no
push str.WORK
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
cmp eax, dword [0x42a77c]
mov dword [0x42a778], eax
jle 0x40414c
mov dword [0x42a778], 0
jmp 0x404156
test eax, eax
jle 0x404156
dec eax
mov dword [0x42a554], eax
push 0x42a378
push 0x80
lea eax, [esp + 0x23c]
push eax
push 0x4176c8
push str.Ver_Display
push str.SYSTEM
call ebp
push 3
lea ecx, [esp + 0x238]
push 0x4176b8
push ecx
call fcn.00404cfb
add esp, 0xc
push 0x42a378
push 0x104
lea edx, [esp + 0x70]
push edx
neg eax
push str.menu.txt
sbb eax, eax
push str.MSG_TEXT
neg eax
push str.START_CHECK
mov dword [0x42a788], eax
call ebp
lea eax, [esp + 0x68]
push eax
call fcn.004046e0
add esp, 4
cmp eax, 1
jne 0x404276
xor esi, esi
push esi
push 0x80
push 3
lea ecx, [esp + 0x40]
push ecx
push eax
push 0x80000000
lea edx, [esp + 0x80]
push edx
mov dword [esp + 0x50], 0xc
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, esi
jbe 0x40424d
push esi
push edi
lea ecx, [esp + 0x174]
call fcn.004039c0
mov eax, dword [esp + 0x17c]
sub eax, dword [esp + 0x178]
jne 0x404237
call fcn.004062dd
mov edx, dword [esp + 0x178]
push esi
lea ecx, [esp + 0x20]
push ecx
push edi
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x17c]
sub eax, dword [esp + 0x178]
cmp edi, eax
jb 0x404264
call fcn.004062dd
mov ecx, dword [esp + 0x178]
push ebx
mov byte [ecx + edi], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x17c]
sub edx, dword [esp + 0x178]
jne 0x404347
push edx
push 0xc8
lea ecx, [esp + 0x174]
call fcn.004039c0
mov eax, dword [esp + 0x17c]
sub eax, dword [esp + 0x178]
jne 0x4042b1
call fcn.004062dd
mov ecx, dword [esp + 0x178]
push 0x42a378
push 0xc8
push ecx
push 0x4172e3
push 0x417690
push str.START_CHECK
call ebp
mov ecx, dword [esp + 0x17c]
mov eax, dword [esp + 0x178]
mov edx, ecx
sub edx, eax
jne 0x4042fb
call fcn.004062dd
mov ecx, dword [esp + 0x17c]
mov eax, dword [esp + 0x178]
cmp byte [eax], 0
jne 0x404347
mov esi, ecx
cmp eax, ecx
jbe 0x404319
call fcn.004062dd
mov ecx, dword [esp + 0x17c]
mov eax, dword [esp + 0x178]
mov edi, dword [esp + 0x16c]
mov ebx, eax
cmp eax, ecx
jbe 0x40432b
call fcn.004062dd
mov eax, dword [esp + 0x16c]
push esi
push edi
push ebx
push eax
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x180]
call fcn.004031b0
push 0x42a378
push 0x20
lea edx, [esp + 0x18c]
push edx
push 0x4172e3
push str.PASS
push str.START_CHECK
call ebp
mov eax, dword [esp + 0x17c]
sub eax, dword [esp + 0x178]
je 0x4043c3
cmp byte [esp + 0x184], 0
jne 0x4043c3
xor esi, esi
cmp eax, esi
ja 0x40438c
call fcn.004062dd
mov eax, dword [0x42a374]
mov ecx, dword [eax*4 + 0x41f3d0]
mov edx, dword [esp + 0x178]
push 0x1021
push ecx
push edx
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
jne 0x4043c3
mov eax, dword [0x42a268]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x403b8c
push str.StartProgRun
lea ecx, [esp + 0x28]
call fcn.00403720
push str.EndProgRun
lea ecx, [esp + 0x2c]
mov byte [esp + 0x50c], 1
call fcn.00403720
mov byte [esp + 0x508], 0
lea edi, [esp + 0x24]
mov esi, 0x451814
jmp 0x404400
mov eax, dword [edi]
push 0x42a378
push 0x104
lea edx, [esi - 0x104]
push edx
push 0x4172e3
push str.PATH
push eax
call ebp
mov ecx, dword [edi]
push 0x42a378
push 0x104
push esi
push 0x4172e3
push 0x417668
push ecx
call ebp
mov eax, dword [edi]
push 0x42a378
push 0x80
lea edx, [esi + 0x104]
push edx
push 0x4172e3
push 0x417664
push eax
call ebp
add esi, 0x288
add edi, 4
cmp esi, 0x451d24
jl 0x404400
push 0x402e40
push 2
push 4
lea ecx, [esp + 0x30]
push ecx
call fcn.004067b1
mov eax, dword [esp + 0x178]
xor esi, esi
cmp eax, esi
je 0x404494
push eax
call fcn.00405b98
add esp, 4
mov edx, dword [esp + 0x16c]
push edx
mov dword [esp + 0x17c], esi
mov dword [esp + 0x180], esi
mov dword [esp + 0x184], esi
call fcn.00405b98
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x500]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4e8]
xor ecx, esp
call fcn.0040495b
add esp, 0x4f8
ret