Function at 0x402950
Capabilities:
Terminate process

Disassembly:
sub esp, 8
push ebp
mov ebp, dword [esp + 0x18]
push esi
push edi
mov edi, dword [esp + 0x1c]
cmp edi, 0x84
mov esi, ecx
ja 0x402b32
je 0x402bed
lea eax, [edi - 2]
cmp eax, 0x22
ja case.0x402985.3
movzx eax, byte [eax + 0x402c68]
jmp dword [eax*4 + 0x402c4c]
mov ecx, dword [esp + 0x24]
mov eax, 0x64
mov dword [ecx + 0x18], eax
mov dword [ecx + 0x1c], eax
jmp case.0x402985.3
cmp byte [esi + 0xa0], 0
je 0x4029c2
mov eax, dword [esi + 0xe4]
test eax, eax
je 0x4029c2
push 0xfffffffffffffff0
push eax
call dword [sym.imp.user32.dll_GetWindowLongA]
mov dword [esi + 0x250], eax
cmp ebp, 1
jne 0x4029fd
cmp byte [esi + 0x341], 0
je 0x4029e1
cmp byte [esi + 0xa0], 0
jne 0x4029e1
push 0
call dword [sym.imp.user32.dll_ClipCursor]
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx + 0x44]
mov byte [esi + 0xa3], 1
mov byte [esi + 0xa4], 0
jmp case.0x402985.3
cmp ebp, 2
jne 0x402a2e
cmp byte [esi + 0xa3], 0
je 0x402a14
mov eax, dword [esi]
push 0
mov ecx, esi
call dword [eax + 0x44]
mov ecx, esi
mov byte [esi + 0xa3], 0
mov byte [esi + 0xa4], 1
call fcn.00401f90
jmp case.0x402985.3
test ebp, ebp
jne case.0x402985.3
cmp byte [esi + 0xa4], 0
je 0x402a52
mov ecx, esi
mov byte [esi + 0xa4], 0
call fcn.00401f90
jmp case.0x402985.3
cmp byte [esi + 0xa3], 0
je case.0x402985.3
mov edx, dword [esi]
push 0
mov ecx, esi
call dword [edx + 0x44]
mov ecx, esi
mov byte [esi + 0xa3], 0
call fcn.00401f90
jmp case.0x402985.3
cmp byte [esi + 0xa1], 0
je case.0x402985.3
cmp byte [esi + 0xa0], 0
jne case.0x402985.3
push 0
call dword [sym.imp.user32.dll_SetCursor]
cmp byte [esi + 0x340], 0
je 0x402ab4
mov esi, dword [esi + 0xf8]
mov eax, dword [esi]
push 1
push esi
call dword [eax + 0x30]
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 8
ret 0x10
call fcn.004d6120
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x34]
mov ecx, esi
call fcn.00401a90
mov eax, dword [esi + 0xf4]
test eax, eax
je 0x402aef
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [esi + 0xf4], 0
mov edx, dword [esi + 0xe8]
push edx
push str.KOEI_Dynasty_Warriors_4_Window_Class
mov dword [esi + 0xe4], 0
call dword [sym.imp.user32.dll_UnregisterClassA]
push 0
call dword [sym.imp.user32.dll_PostQuitMessage]
push 0
call fcn.0062ffbc
mov byte [esi + 0x344], 0
jmp case.0x402985.3
mov byte [esi + 0x344], 1
jmp case.0x402985.3
cmp edi, 0x212
ja 0x402c08
je 0x402c04
mov eax, edi
sub eax, 0x112
je 0x402bc5
sub eax, 0xee
je 0x402b6b
sub eax, 0x11
jne case.0x402985.3
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x44]
jmp case.0x402985.3
cmp byte [esi + 0xa1], 0
je case.0x402985.3
cmp dword [esi + 0xf8], 0
je case.0x402985.3
lea ecx, [esp + 0xc]
push ecx
call dword [sym.imp.user32.dll_GetCursorPos]
cmp byte [esi + 0xa0], 0
jne 0x402bab
mov eax, dword [esi + 0xe4]
lea edx, [esp + 0xc]
push edx
push eax
call dword [sym.imp.user32.dll_ScreenToClient]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0xc]
mov esi, dword [esi + 0xf8]
mov ecx, dword [esi]
push 0
push edx
push eax
push esi
call dword [ecx + 0x2c]
jmp case.0x402985.3
cmp ebp, 0xf030
ja 0x402bdf
je 0x402bed
mov eax, ebp
sub eax, 0xf000
je 0x402bed
sub eax, 0x10
je 0x402bed
jmp case.0x402985.3
mov eax, ebp
sub eax, 0xf100
je 0x402bed
sub eax, 0x70
jne case.0x402985.3
cmp byte [esi + 0xa0], 0
jne case.0x402985.3
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 8
ret 0x10
push 0
jmp 0x402c2a
mov eax, edi
sub eax, 0x231
je 0x402c28
sub eax, 1
jne case.0x402985.3
mov eax, dword [esi]
push 0
mov ecx, esi
call dword [eax + 0x44]
mov ecx, esi
call fcn.00401f90
jmp case.0x402985.3
push 1
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x44]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
push eax
push ebp
push edi
push ecx
call dword [sym.imp.user32.dll_DefWindowProcA]
pop edi
pop esi
pop ebp
add esp, 8
ret 0x10