Function at 0x410870
Capabilities:
Check os version
Hide graphical window
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
mov eax, dword [0x463070]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0xc4]
push esi
push edi
push 0x94
push 0
push eax
mov dword [ebp - 0xe0], ebx
call fcn.0042bfd0
add esp, 0xc
mov dword [ebp - 0xc4], 0x94
lea eax, [ebp - 0xc4]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0xb4], 2
jne 0x4108e4
mov eax, dword [ebp - 0xc0]
cmp eax, 6
ja 0x4108db
jne 0x4108e4
cmp dword [ebp - 0xbc], 2
jb 0x4108e4
mov byte [0x4728b7], 1
jmp 0x4108eb
mov byte [0x4728b7], 0
push str.micom_mahjong
push str._s.ini
call fcn.00401150
push eax
call fcn.004015a0
add esp, 0xc
mov dword [ebp - 0x124], 3
mov dword [ebp - 0x120], 0x40ea90
mov dword [ebp - 0x11c], 0
mov dword [ebp - 0x118], 0
push 0x66
push ebx
mov dword [ebp - 0x114], ebx
call dword [sym.imp.USER32.dll_LoadIconA]
push 0x7f00
push 0
mov dword [ebp - 0x110], eax
call dword [sym.imp.USER32.dll_LoadCursorA]
push 4
mov dword [ebp - 0x10c], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x124]
push eax
mov dword [ebp - 0x104], 0x65
mov dword [ebp - 0x100], str.CWINDOW
call dword [sym.imp.USER32.dll_RegisterClassA]
movdqa xmm0, xmmword [0x44a880]
lea eax, [ebp - 0xd4]
push 1
push 0x10ca0000
push eax
movdqu xmmword [ebp - 0xd4], xmm0
call dword [sym.imp.USER32.dll_AdjustWindowRect]
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edi, eax
push 8
push edi
call esi
push 0xa
push edi
mov dword [0x4728bc], eax
call esi
push 0xc
push edi
mov dword [0x4728c0], eax
call esi
push edi
push 0
mov dword [0x4728c4], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp - 0xd4]
mov edi, dword [ebp - 0xcc]
sub eax, edi
add eax, dword [0x4728bc]
mov ecx, dword [ebp - 0xc8]
sub edi, dword [ebp - 0xd4]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xd0]
push 0
sub eax, ecx
sub ecx, dword [ebp - 0xd0]
add eax, dword [0x4728c0]
push ebx
mov ebx, dword [ebp - 0xf0]
push 0
push 0
cdq
push ecx
sub eax, edx
xor ecx, ecx
sar eax, 1
push edi
cmovs eax, ecx
push eax
push ebx
push 0x10ca0000
push str.MICOM_MAHJONG
push str.CWINDOW
push ecx
call dword [sym.imp.USER32.dll_CreateWindowExA]
push dword [ebp + 0x14]
mov edi, eax
push edi
call dword [sym.imp.USER32.dll_ShowWindow]
push edi
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [0x4728b0]
test eax, eax
je 0x410a74
push eax
call dword [sym.imp.USER32.dll_IsMenu]
test eax, eax
jne 0x410a92
push 0x65
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.dll_LoadMenuA]
push eax
push edi
mov dword [0x4728b0], eax
call dword [sym.imp.USER32.dll_SetMenu]
cmp byte [0x46e983], 0
je 0x410aa4
push edi
call fcn.0040fc20
add esp, 4
mov eax, dword [0x4728b8]
test eax, eax
je 0x410ac9
cmp byte [0x4728b5], 0
je 0x410ac9
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov esi, dword [ebp - 8]
sub esi, dword [ebp - 0x10]
jmp 0x410acb
xor esi, esi
lea eax, [ebp - 0x30]
push eax
push edi
call dword [sym.imp.USER32.dll_GetClientRect]
mov ecx, dword [ebp - 0x24]
lea eax, [esi + 0x190]
cmp ecx, eax
je 0x410b30
mov eax, dword [ebp - 0xc8]
sub esi, ecx
mov ecx, dword [ebp - 0xcc]
add eax, 0x190
sub ecx, dword [ebp - 0xd4]
add esi, eax
mov eax, dword [ebp - 0xd0]
sub eax, esi
mov dword [ebp - 0xc8], esi
add eax, dword [0x4728c0]
sub esi, dword [ebp - 0xd0]
push 4
push esi
cdq
push ecx
sub eax, edx
xor ecx, ecx
sar eax, 1
cmovs eax, ecx
push eax
push ebx
push ecx
push edi
call dword [sym.imp.USER32.dll_SetWindowPos]
call fcn.0040f630
mov ecx, dword [0x46e74c]
test ecx, ecx
js 0x410b4f
cmp ecx, 0xa
jge 0x410b54
push 0
lea eax, [ecx + 0xa155]
push eax
jmp 0x410b7c
cmp ecx, 0xa
jl 0x410b6b
mov eax, dword [0x4728cc]
add eax, 0xa
cmp ecx, eax
jge 0x410b6b
push 0
lea eax, [ecx + 0xa155]
push eax
jmp 0x410b7c
push 0
mov dword [0x46e74c], 0
push 0xa155
push 0x111
push edi
call dword [sym.imp.USER32.dll_PostMessageA]
mov ebx, dword [ebp - 0xe0]
push 0x67
push ebx
call dword [sym.imp.USER32.dll_LoadAcceleratorsA]
push 0x44c
mov dword [ebp - 0xfc], eax
call fcn.0042cfb8
add esp, 4
test eax, eax
je 0x410bb9
push ebx
push edi
mov ecx, eax
call fcn.00408730
jmp 0x410bbb
xor eax, eax
push 1
push 0x190
push 0x200
mov ecx, eax
mov dword [0x4728ac], eax
call fcn.004095e0
push dword [0x4728b0]
push edi
call fcn.004107f0
add esp, 8
push 0x8000
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
xor ecx, ecx
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0xe4], esi
xor eax, eax
mov dword [ebp - 0xec], ecx
mov dword [ebp - 0xdc], ecx
mov byte [ebp - 0xd5], cl
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], eax
jmp 0x410c36
mov esi, dword [ebp - 0xe4]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x410c9e
push 0
push 0
push 0
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x410f65
lea eax, [ebp - 0x140]
push eax
push dword [ebp - 0xfc]
push edi
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x410c36
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x410c36
mov ecx, dword [0x4728ac]
test ecx, ecx
je 0x410c36
call fcn.00409010
add ebx, eax
mov dword [ebp - 0xe0], 0
cmp byte [0x46e748], 0
mov dword [ebp - 0xe8], ebx
jne 0x410cd7
mov ecx, dword [0x4728ac]
call fcn.00408ba0
test al, al
je 0x410cf9
mov ecx, dword [0x4728ac]
call fcn.00408bc0
test al, al
jne 0x410cf9
mov ecx, dword [0x4728ac]
call fcn.00408bb0
test al, al
jne 0x410cf9
mov bl, 1
jmp 0x410cfb
xor bl, bl
cmp byte [ebp - 0xd5], 0
je 0x410d08
test bl, bl
je 0x410d11
cmp dword [ebp - 0xdc], 0
jne 0x410d1d
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 0xdc], eax
test bl, bl
jne 0x410d4c
mov ecx, dword [0x4728ac]
call fcn.004089e0
mov edx, dword [0x472a70]
add edx, eax
mov ecx, edx
sar ecx, 0xa
mov eax, ecx
shl eax, 0xa
sub edx, eax
add dword [ebp - 0xdc], ecx
mov dword [0x472a70], edx
mov byte [ebp - 0xd5], bl
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x4728ac]
cmp dword [ebp - 0xdc], eax
jbe 0x410d90
call fcn.00408930
add esi, eax
xor ecx, ecx
mov dword [ebp - 0xe4], esi
mov dword [ebp - 0xec], ecx
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [ebp - 0xdc]
sub ecx, eax
cmp ecx, 0xa
jl 0x410dd4
jmp 0x410dda
inc dword [ebp - 0xec]
call fcn.00408a40
fstp qword [ebp - 0xc]
cvttsd2si eax, qword [ebp - 0xc]
cmp dword [ebp - 0xec], eax
jle 0x410dd4
mov ecx, dword [0x4728ac]
call fcn.00408930
add esi, eax
mov dword [ebp - 0xec], 0
mov dword [ebp - 0xe4], esi
call dword [sym.imp.WINMM.dll_timeGetTime]
mov dword [ebp - 0xdc], eax
mov ecx, dword [ebp - 0xe0]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.WINMM.dll_timeGetTime]
mov esi, eax
mov eax, dword [ebp - 0xf8]
cmp eax, esi
ja 0x410ee8
test eax, eax
je 0x410edc
mov ecx, dword [0x4728ac]
cmp dword [ecx + 0x48], 0
jle 0x410e36
lea eax, [ecx + 0x4c]
push eax
push str.MICOM_MAHJONG
push str._s____s
call fcn.004011d0
add esp, 0xc
push eax
push edi
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov eax, dword [0x4728ac]
dec dword [eax + 0x48]
jmp 0x410ecc
mov eax, dword [ebp - 0xe8]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
test bl, bl
je 0x410e8a
mulsd xmm0, qword [0x44a878]
movsd qword [ebp - 0xc], xmm0
call fcn.00408a40
movsd xmm0, qword [ebp - 0xc]
movsd qword [ebp - 0xc], xmm0
fdivr qword [ebp - 0xc]
fadd qword [0x4483d8]
fstp qword [ebp - 0xc]
cvttsd2si eax, qword [ebp - 0xc]
push eax
push str.MICOM_MAHJONG
push str._s___Skip_Frames___d____
call fcn.004011d0
add esp, 0xc
jmp 0x410ec4
mov ecx, dword [ebp - 0xe4]
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
mulsd xmm1, qword [0x44a878]
divsd xmm1, xmm0
addsd xmm1, qword [0x4483d8]
cvttsd2si eax, xmm1
push eax
push ecx
push str.MICOM_MAHJONG
push str._s____d_fps___d____
call fcn.004011d0
add esp, 0x10
push eax
push edi
call dword [sym.imp.USER32.dll_SetWindowTextA]
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0xe4], ecx
mov dword [ebp - 0xe8], eax
lea eax, [esi + 0x3e8]
mov dword [ebp - 0xf8], eax
cmp dword [ebp - 0xf4], esi
ja 0x410efc
lea eax, [esi + 0xc8]
mov dword [ebp - 0xf4], eax
mov ebx, dword [ebp - 0xe8]
cmp dword [ebp - 0xf0], esi
ja 0x410c30
push 2
call dword [sym.imp.KERNEL32.dll_SetThreadExecutionState]
push 0x1c
lea eax, [ebp - 0x20]
mov dword [ebp - 8], 0
xorps xmm0, xmm0
movdqu xmmword [ebp - 0x20], xmm0
push eax
movq qword [ebp - 0x10], xmm0
push 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.USER32.dll_SendInput]
lea eax, [esi + 0x7530]
mov dword [ebp - 0xf0], eax
jmp 0x410c30
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]