Function at 0x4217b0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x5ac
mov eax, 0x200304
push ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x5b4]
push ebp
push esi
push edi
test eax, eax
mov esi, ecx
mov dword [esp + 0x9c], str.TWB_CLOSE
mov dword [esp + 0xa0], str.TWB_AUTO
mov dword [esp + 0xa4], str.TWB_SKIP
mov dword [esp + 0xa8], str.TWB_JUMP
mov dword [esp + 0xac], str.TWB_RETURN
mov dword [esp + 0xb0], str.TWB_BACKLOG
mov dword [esp + 0xb4], str.TWB_SYSTEM
mov dword [esp + 0xb8], str.TWB_SYSTEM2
mov dword [esp + 0xbc], str.TWB_VOICE
mov dword [esp + 0xc0], str.TWB_SAVE
mov dword [esp + 0xc4], str.TWB_LOAD
mov dword [esp + 0xc8], str.TWB_QSAVE
mov dword [esp + 0xcc], str.TWB_QLOAD
mov dword [esp + 0xd0], str.TWB_MENU
mov dword [esp + 0xd4], str.TWB_TITLE
mov dword [esp + 0xd8], str.TWB_EXIT
mov dword [esp + 0xdc], str.TWB_SCENE_BACK
mov dword [esp + 0xe0], str.TWB_SHOTCAMERA
mov dword [esp + 0xe4], str.TWB_CHARA_STATUS
mov dword [esp + 0xe8], str.TWB_LOOP_FINISH
mov dword [esp + 0xec], str.TWB_MINI_SCENARIO
mov dword [esp + 0xf0], str.TWB_MINI_SCENARIO2
mov dword [esp + 0xf4], str.TWB_MINI_SCENARIO3
mov dword [esp + 0xf8], str.TWB_BGV_FLAG_CHANGE
mov dword [esp + 0x3c], 0x200204
mov dword [esp + 0x40], 0x200102
mov dword [esp + 0x44], 0x200101
mov dword [esp + 0x48], 0x200103
mov dword [esp + 0x4c], 0x200104
mov dword [esp + 0x50], 0x200303
mov dword [esp + 0x5c], 0x200201
mov dword [esp + 0x60], 0x200301
mov dword [esp + 0x64], 0x200302
mov dword [esp + 0x68], 0x200202
mov dword [esp + 0x6c], 0x200203
mov dword [esp + 0x70], 0x200305
mov dword [esp + 0x74], 0x2002fe
mov dword [esp + 0x78], 0x2002ff
mov dword [esp + 0x7c], 0x2002fb
mov dword [esp + 0x80], 0x200205
mov dword [esp + 0x84], 0x200306
mov dword [esp + 0x88], 0x200307
mov dword [esp + 0x8c], 0x200308
mov dword [esp + 0x90], 0x200309
mov dword [esp + 0x94], 0x200310
mov dword [esp + 0x98], 0x200311
jne 0x4219b8
lea eax, [esp + 0xfc]
push str.MESSAGEWINDOW
push eax
call fcn.004b093f
add esp, 8
jmp 0x4219ce
push eax
lea ecx, [esp + 0x100]
push str.MESSAGEWINDOW_02d
push ecx
call fcn.004b093f
add esp, 0xc
lea eax, [esi + 0x79ebdd]
mov ebx, 1
mov dword [esp + 0x20], eax
lea edx, [esi + 0x7a0ed1]
lea eax, [esi + 0x7a0eb9]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], edx
lea edi, [esi + 0x7a0ec5]
mov dword [esp + 0x18], eax
jmp 0x421a01
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push 1
call fcn.00416750
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
push ebx
lea ecx, [esp + 0x140]
push str.TEXT_BUTTON_TYPE__02d
push ecx
call ebp
add esp, 0xc
lea eax, [edi - 0x10]
lea edx, [esp + 0x13c]
lea ecx, [esi + 0x2a9e62]
push eax
lea eax, [esp + 0x100]
push edx
push eax
call fcn.00407d60
push ebx
lea ecx, [esp + 0x140]
push str.TWM_WIDTH__02d
push ecx
call ebp
add esp, 0xc
lea ebp, [edi + 4]
lea edx, [esp + 0x13c]
lea eax, [esp + 0xfc]
push ebp
push edx
push eax
lea ecx, [esi + 0x2a9e62]
call fcn.00407d60
push ebx
lea ecx, [esp + 0x140]
push str.TWM_HEIGHT__02d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ebx, [edi + 8]
lea edx, [esp + 0x13c]
lea eax, [esp + 0xfc]
push ebx
push edx
push eax
lea ecx, [esi + 0x2a9e62]
call fcn.00407d60
mov edx, dword [esp + 0x18]
xor ecx, ecx
xor eax, eax
mov dword [edx], ecx
mov ax, word [edi - 0x10]
cmp eax, 5
ja case.default.0x421ac3
jmp dword [eax*4 + 0x422104]
mov word [edi - 4], cx
mov word [edi], cx
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
jmp case.default.0x421ac3
mov word [edi - 4], cx
xor edx, edx
mov word [edi], cx
mov dx, word [ebx]
neg edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], edx
jmp case.default.0x421ac3
mov ax, word [esi + 0x2aa7d2]
xor edx, edx
sub ax, word [ebp]
mov word [edi - 4], ax
xor eax, eax
mov word [edi], cx
mov dx, word [esi + 0x2aa7d2]
mov ax, word [ebp]
sub edx, eax
mov dword [esp + 0x10], edx
jmp 0x421b70
mov dx, word [esi + 0x2aa7d2]
mov dword [esp + 0x10], ecx
sub dx, word [ebp]
mov word [edi - 4], dx
mov ax, word [esi + 0x2aa7d4]
sub ax, word [ebx]
xor ecx, ecx
mov word [edi], ax
mov cx, word [esi + 0x2aa7d4]
jmp 0x421b70
mov word [edi - 4], cx
mov dx, word [esi + 0x2aa7d4]
sub dx, word [ebx]
xor eax, eax
mov word [edi], dx
mov ax, word [ebp]
neg eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
movsx eax, word [edi]
xor ecx, ecx
xor edx, edx
mov cx, word [ebx]
mov dx, word [ebp]
push ecx
push edx
movsx ecx, word [edi - 4]
mov edx, dword [esp + 0x24]
push eax
push ecx
push edx
call dword [sym.imp.USER32.dll_SetRect]
fild dword [esp + 0x14]
push 0
push ecx
fstp dword [esp]
fild dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x2c]
fstp dword [esp]
call fcn.00416e30
xor eax, eax
xor ecx, ecx
mov ax, word [ebx]
mov cx, word [ebp]
mov ebx, dword [esp + 0x20]
push eax
push ecx
push 0
push 0
mov ecx, ebx
call fcn.00417080
push 0
push 0
mov ecx, ebx
call fcn.00417050
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x24], eax
add edx, 4
add ecx, 0x10
add edi, 2
add ebx, 0xf0c
dec eax
cmp eax, 2
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ebx
jl 0x4219fd
xor ebp, ebp
mov dword [esi + 0x79cf94], 0xffffffff
mov dword [esp + 0x14], ebp
mov dword [esi + 0x5a6f04], ebp
mov dword [esp + 0x10], ebp
xor eax, eax
mov dword [esp + 0x18], eax
mov ebx, dword [esp + eax + 0x9c]
lea edx, [esp + 0x1bc]
push 0x400
push edx
lea eax, [esp + 0x104]
push ebx
push eax
lea ecx, [esi + 0x2a9e62]
call fcn.00407ce0
test eax, eax
je 0x4220a0
lea ecx, [esp + 0x24]
lea edx, [esp + 0x1bc]
push ecx
push 0x2c
push ebp
push edx
call fcn.00402990
mov eax, dword [esp + 0x34]
add esp, 0x10
cmp eax, ebp
je 0x4220a0
lea eax, [esp + 0x30]
lea ecx, [esp + 0x1bc]
push eax
push 0x2c
push 2
push ecx
call fcn.00402990
lea edx, [esp + 0x3c]
lea eax, [esp + 0x1cc]
push edx
push 0x2c
push 3
push eax
call fcn.00402990
lea ecx, [esp + 0x54]
lea edx, [esp + 0x1dc]
push ecx
push 0x2c
push 4
push edx
call fcn.00402990
lea eax, [esp + 0x58]
lea ecx, [esp + 0x1ec]
push eax
push 0x2c
push 5
push ecx
call fcn.00402990
add esp, 0x40
lea edx, [esp + 0x38]
lea eax, [esp + 0x1bc]
push edx
push 0x2c
push 6
push eax
call fcn.00402990
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x1cc]
push ecx
push 0x2c
push 7
push edx
call fcn.00402990
lea eax, [esp + 0x40]
lea ecx, [esp + 0x1dc]
push eax
push 0x2c
push 1
push ecx
call fcn.00402990
mov eax, dword [esp + 0x50]
add esp, 0x30
cmp eax, 0x63
lea edi, [eax + 0x100]
ja case.0x421d38.60
xor edx, edx
mov dl, byte [eax + 0x422130]
jmp dword [edx*4 + 0x42211c]
cmp dword [esp + 0x10], 1
je 0x4220a0
lea eax, [esi + 0x79dcd1]
mov dword [esp + 0x14], eax
jmp case.0x421d38.60
cmp dword [esp + 0x10], ebp
je 0x4220a0
lea eax, [esi + 0x79ebdd]
mov dword [esp + 0x14], eax
jmp case.0x421d38.60
cmp dword [esp + 0x10], ebp
je 0x4220a0
lea ecx, [esi + 0x79fae9]
mov dword [esp + 0x14], ecx
jmp case.0x421d38.60
cmp dword [esp + 0x10], 1
je 0x4220a0
mov dword [esp + 0x14], ebp
mov ecx, esi
call fcn.004206a0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
push ebp
push edx
mov ecx, dword [esp + eax + 0x44]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x40]
push 1
push ecx
mov ecx, dword [esp + 0x38]
push edi
push 0x805
push 1
push 1
push 0x200
push edx
mov edx, dword [esp + 0x5c]
push eax
mov eax, dword [esp + 0x58]
push ecx
mov ecx, dword [esp + 0x60]
push edx
push eax
push ecx
mov ecx, esi
call fcn.004206e0
mov edi, str.TWB_MINI_SCENARIO
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x421e08
test cl, cl
je 0x421e04
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x421e08
add eax, 2
add edi, 2
test cl, cl
jne 0x421de4
xor eax, eax
jmp 0x421e0d
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x421e89
mov dword [esi + 0x79cf90], ebp
mov dword [esi + 0x79cf94], 0xffffffff
mov word [esi + 0x79cf9a], bp
mov word [esi + 0x79cf98], bp
mov word [esi + 0x79cf9e], bp
mov word [esi + 0x79cf9c], bp
mov word [esi + 0x79cfa2], bp
mov word [esi + 0x79cfa0], bp
mov word [esi + 0x79cfa6], bp
mov word [esi + 0x79cfa4], bp
mov eax, dword [esi + 0x5a6f04]
push ebp
mov ecx, eax
mov dword [esi + 0x79cf94], eax
shl ecx, 5
sub ecx, eax
push ebp
mov dword [esi + 0x79cf90], ebp
lea ecx, [ecx + ecx*8]
lea edx, [eax + ecx*4]
lea eax, [eax + edx*4]
lea ecx, [esi + eax*2 + 0x2ab318]
call fcn.00417050
mov edi, str.TWB_MINI_SCENARIO2
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x421eb4
test cl, cl
je 0x421eb0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x421eb4
add eax, 2
add edi, 2
test cl, cl
jne 0x421e90
xor eax, eax
jmp 0x421eb9
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x421f35
mov dword [esi + 0x79cfa8], ebp
mov dword [esi + 0x79cfac], 0xffffffff
mov word [esi + 0x79cfb2], bp
mov word [esi + 0x79cfb0], bp
mov word [esi + 0x79cfb6], bp
mov word [esi + 0x79cfb4], bp
mov word [esi + 0x79cfba], bp
mov word [esi + 0x79cfb8], bp
mov word [esi + 0x79cfbe], bp
mov word [esi + 0x79cfbc], bp
mov eax, dword [esi + 0x5a6f04]
push ebp
mov ecx, eax
mov dword [esi + 0x79cfac], eax
shl ecx, 5
sub ecx, eax
push ebp
mov dword [esi + 0x79cfa8], ebp
lea ecx, [ecx + ecx*8]
lea edx, [eax + ecx*4]
lea eax, [eax + edx*4]
lea ecx, [esi + eax*2 + 0x2ab318]
call fcn.00417050
mov edi, str.TWB_MINI_SCENARIO3
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x421f60
test cl, cl
je 0x421f5c
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x421f60
add eax, 2
add edi, 2
test cl, cl
jne 0x421f3c
xor eax, eax
jmp 0x421f65
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x421fe1
mov dword [esi + 0x79cfc0], ebp
mov dword [esi + 0x79cfc4], 0xffffffff
mov word [esi + 0x79cfca], bp
mov word [esi + 0x79cfc8], bp
mov word [esi + 0x79cfce], bp
mov word [esi + 0x79cfcc], bp
mov word [esi + 0x79cfd2], bp
mov word [esi + 0x79cfd0], bp
mov word [esi + 0x79cfd6], bp
mov word [esi + 0x79cfd4], bp
mov eax, dword [esi + 0x5a6f04]
push ebp
mov ecx, eax
mov dword [esi + 0x79cfc4], eax
shl ecx, 5
sub ecx, eax
push ebp
mov dword [esi + 0x79cfc0], ebp
lea ecx, [ecx + ecx*8]
lea edx, [eax + ecx*4]
lea eax, [eax + edx*4]
lea ecx, [esi + eax*2 + 0x2ab318]
call fcn.00417050
mov edi, str.TWB_BGV_FLAG_CHANGE
mov eax, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x42200c
test cl, cl
je 0x422008
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x42200c
add eax, 2
add edi, 2
test cl, cl
jne 0x421fe8
xor eax, eax
jmp 0x422011
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebp
jne 0x422058
mov ecx, dword [esi + 0x5a6f04]
xor edx, edx
mov eax, ecx
mov dl, byte [esi + 0x5a73bd]
shl eax, 5
sub eax, ecx
lea eax, [eax + eax*8]
lea eax, [ecx + eax*4]
lea ecx, [ecx + eax*4]
mov dword [esi + ecx*2 + 0x2ad5fa], edx
mov ecx, dword [esi + 0x5a6f04]
mov eax, ecx
shl eax, 5
sub eax, ecx
lea edx, [eax + eax*8]
lea eax, [ecx + edx*4]
lea ecx, [ecx + eax*4]
mov byte [esi + ecx*2 + 0x2ac22a], 5
mov edi, str.TWB_SHOTCAMERA
mov eax, ebx
mov dl, byte [eax]
mov bl, byte [edi]
mov cl, dl
cmp dl, bl
jne 0x422087
test cl, cl
je 0x422083
mov dl, byte [eax + 1]
mov bl, byte [edi + 1]
mov cl, dl
cmp dl, bl
jne 0x422087
add eax, 2
add edi, 2
test cl, cl
jne 0x42205f
xor eax, eax
jmp 0x42208c
sbb eax, eax
sbb eax, 0xffffffff
push 1
cmp eax, ebp
push ebp
push ebp
je 0x422097
push ebp
jmp 0x422099
push 0x63
mov ecx, esi
call fcn.00420a50
mov eax, dword [esp + 0x18]
add eax, 4
cmp eax, 0x60
mov dword [esp + 0x18], eax
jl 0x421c2d
mov eax, dword [esp + 0x10]
cmp eax, ebp
jne 0x4220ca
mov cx, word [esi + 0x5a6f04]
mov word [esi + 0x7a0f43], cx
inc eax
cmp eax, 2
mov dword [esp + 0x10], eax
jl 0x421c27
mov dx, word [esi + 0x5a6f04]
push ebp
push 1
mov ecx, esi
mov word [esi + 0x7a0f41], dx
call fcn.004221a0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x5ac
ret 4