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

Disassembly:
push 0xffffffffffffffff
push 0x586d92
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa0
push ebx
push esi
push edi
mov edi, ecx
lea eax, [esp + 0x34]
push 1
mov ecx, dword [edi + 0x54]
push eax
push str.max_tricks
mov dword [esp + 0x3c], edi
call fcn.004180b0
mov esi, dword [edi + 0x2c4]
xor ebx, ebx
lea ecx, [esp + 0x10]
push ebx
push ecx
mov ecx, dword [edi + 0x54]
push str.combo
mov dword [esp + 0x28], 1
mov byte [esp + 0x23], bl
mov dword [esp + 0x1c], ebx
call fcn.004180b0
cmp dword [esp + 0x10], ebx
jne 0x501528
mov ecx, dword [edi + 0x54]
push str.combo
call fcn.004187c0
test al, al
jne 0x501528
mov ecx, dword [edi + 0x54]
lea edx, [esp + 0x10]
push ebx
push edx
push str.single_combo
mov dword [esp + 0x1c], ebx
call fcn.004180b0
cmp dword [esp + 0x10], ebx
jne 0x501528
mov ecx, dword [edi + 0x54]
push str.single_combo
call fcn.004187c0
test al, al
je 0x501547
mov ecx, dword [edi + 0x54]
lea eax, [esp + 0x1c]
push 1
push eax
push str.combo_size
mov byte [esp + 0x23], 1
call fcn.004180b0
add esi, dword [esp + 0x1c]
jmp 0x501548
inc esi
cmp esi, dword [esp + 0x34]
jle 0x501569
mov ecx, edi
call fcn.004e73e0
mov esi, eax
call fcn.004ee170
push esi
mov ecx, eax
call fcn.004ea9e0
jmp 0x50227f
mov al, byte [esp + 0x17]
mov dword [esp + 0x40], ebx
cmp al, bl
je 0x501594
xor eax, eax
cmp byte [edi + eax + 0x2cc], bl
je 0x501588
inc eax
cmp eax, 0x1e
jl 0x501577
jmp 0x501594
mov dword [esp + 0x40], eax
mov byte [eax + edi + 0x2cc], 1
cmp dword [esp + 0x1c], ebx
jle 0x50227f
push ebp
jmp 0x5015a5
mov edi, dword [esp + 0x34]
mov ecx, dword [0xab4b80]
lea edx, [esp + 0x40]
push ebx
mov dword [esp + 0x28], ecx
mov ecx, dword [edi + 0x54]
push edx
push str.goal_tetris_key_combos
mov dword [esp + 0x4c], ebx
call fcn.00418410
xor esi, esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x10], esi
xor eax, eax
lea ecx, [edi + 0x78]
cmp byte [ecx], 1
je 0x5015e9
inc eax
add ecx, 0x14
cmp eax, 0x1e
jl 0x5015d9
jmp 0x501609
lea ecx, [eax + eax*4 + 0x1e]
lea edx, [eax + eax*4]
mov esi, eax
mov byte [edi + ecx*4], bl
mov ecx, dword [esp + 0x44]
lea eax, [edi + edx*4]
mov dword [esp + 0x10], esi
mov dword [eax + 0x7c], ecx
mov dword [eax + 0x70], ebx
mov dword [eax + 0x6c], ebx
mov eax, dword [esp + 0x40]
mov dword [esp + 0x28], ebx
cmp eax, ebx
jne 0x5016c8
mov ecx, dword [edi + 0x54]
lea edx, [esp + 0x14]
push 1
push edx
push str.goal_tetris_tricks
mov dword [esp + 0x20], ebx
call fcn.00418410
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 8]
push eax
call fcn.00402bf0
mov ecx, dword [esp + 0x18]
add esp, 4
push eax
call fcn.00408850
lea ecx, [esp + 0x94]
mov esi, eax
push 1
push ecx
push str.trick
mov ecx, esi
call fcn.00417f70
mov edx, dword [esp + 0x94]
push edx
call fcn.00413eb0
add esp, 4
mov dword [esp + 0x30], eax
lea eax, [esp + 0x3c]
mov ecx, esi
push 1
push eax
push str.text
call fcn.00417f70
lea ecx, [esp + 0x2c]
push ebx
push ecx
push str.key_combo
mov ecx, esi
call fcn.00418560
test al, al
jne 0x5016b2
lea edx, [esp + 0x28]
push ebx
push edx
push str.key_combo
mov ecx, esi
call fcn.00417f70
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
lea eax, [eax + eax*4]
lea edi, [edi + eax*4]
mov dword [edi + 0x6c], ecx
jmp 0x501763
push eax
mov ecx, edi
call fcn.004e7090
mov ecx, dword [0xab5b48]
push ebx
mov dword [esp + 0x30], eax
call fcn.004fa690
push str.trick_mapping
mov ecx, eax
call fcn.004df130
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x30]
push 1
push edx
push ecx
mov ecx, eax
call fcn.004184b0
mov edx, dword [esp + 0x30]
push ebx
push edx
call fcn.00419c50
add esp, 8
cmp eax, ebx
jne 0x501728
mov eax, dword [esp + 0x30]
push 1
push eax
call fcn.00419dc0
add esp, 8
mov ecx, eax
push ebx
call fcn.00408850
lea ecx, [esp + 0x90]
push 1
push ecx
push str.Params
mov ecx, eax
call fcn.00418370
mov ecx, dword [esp + 0x90]
lea edx, [esp + 0x3c]
push 1
push edx
push str.Name
call fcn.00418900
mov ecx, dword [esp + 0x2c]
lea eax, [esi + esi*4]
lea edi, [edi + eax*4]
mov dword [edi + 0x70], ecx
mov eax, dword [0xb084cc]
mov dword [esp + 0x1c], edi
cmp eax, ebx
je 0x5017d7
mov ecx, dword [0xb084b8]
cmp ecx, ebx
jne 0x5017a8
mov edx, dword [str.Null_Pointer]
push edx
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov ecx, dword [0xb084b8]
add esp, 0xc
cmp ecx, ebx
jne 0x5017a8
call fcn.0052ff20
mov ecx, dword [0xb084b8]
mov eax, dword [ecx + 0x108]
push eax
call fcn.00533cd0
push ebx
push 1
push 8
call fcn.00401180
mov ecx, eax
call fcn.00533b80
mov esi, eax
call fcn.00401180
mov ecx, eax
call fcn.00533d40
mov eax, esi
jmp 0x5017ff
mov eax, dword [0x5ca258]
mov ecx, dword [eax*4 + 0x5ca24c]
cmp ecx, ebx
je 0x5017ee
call fcn.005331c0
jmp 0x5017ff
push ebx
push 1
push 8
call fcn.00401180
mov ecx, eax
call fcn.00533b80
mov dword [esp + 0x10], eax
cmp eax, ebx
mov dword [esp + 0xb8], ebx
je 0x501819
mov ecx, eax
call fcn.00415710
mov ebp, eax
jmp 0x50181b
xor ebp, ebp
or esi, 0xffffffff
push 0x148
mov dword [esp + 0xbc], esi
call fcn.00401290
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, ebx
mov dword [esp + 0xb8], 1
je 0x501850
mov ecx, eax
call fcn.004738a0
mov edi, eax
jmp 0x501852
xor edi, edi
mov ecx, dword [0x589680]
mov dword [esp + 0x14], edi
push ecx
mov ecx, edi
mov dword [esp + 0xbc], esi
call fcn.00423320
mov ecx, dword [esp + 0x24]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [esp + 0x1b]
mov dword [esp + 0x10], 0x14
cmp al, bl
je 0x501894
cmp dword [esp + 0x20], 1
jne 0x501894
mov dword [esp + 0x10], 0x28
fild dword [esp + 0x10]
push ecx
mov ecx, ebp
fstp dword [esp]
push 0x42c80000
push str.dims
call fcn.004171b0
mov eax, dword [edi]
push ebp
mov ecx, edi
call dword [eax + 4]
push 1
push str.tetris_tricks_menu
call fcn.00413eb0
add esp, 4
lea ecx, [esp + 0x9c]
push eax
push ecx
mov ecx, dword [esp + 0x30]
call fcn.004748f0
mov ecx, dword [esp + 0x98]
mov esi, dword [eax]
cmp ecx, ebx
je 0x5018f7
lea edx, [esp + 0x98]
push edx
call fcn.004287f0
mov dword [esp + 0x98], ebx
push ebx
mov ecx, esi
call fcn.00471e10
lea eax, [esp + 0x48]
mov ecx, edi
push eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x4c], edi
call fcn.004287d0
cmp esi, ebx
mov dword [esp + 0xb8], 2
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x6c], esi
je 0x50193e
lea ecx, [esp + 0x6c]
push ecx
mov ecx, esi
call fcn.004287d0
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x48]
push 1
lea eax, [esp + 0x70]
push edx
push eax
mov byte [esp + 0xc4], 3
call fcn.004747d0
mov ecx, dword [esp + 0x6c]
mov byte [esp + 0xb8], 2
cmp ecx, ebx
je 0x501979
lea edx, [esp + 0x6c]
push edx
call fcn.004287f0
mov dword [esp + 0x6c], ebx
mov ecx, dword [esp + 0x48]
mov dword [esp + 0xb8], 0xffffffff
cmp ecx, ebx
je 0x50199a
lea eax, [esp + 0x48]
push eax
call fcn.004287f0
mov dword [esp + 0x48], ebx
cmp ebp, ebx
je 0x501a0b
mov ecx, ebp
call fcn.004159e0
cmp dword [0xb084cc], ebx
je 0x5019b7
push ebp
call fcn.00401180
mov ecx, eax
jmp 0x501a06
mov ecx, dword [0x5ca258]
mov ecx, dword [ecx*4 + 0x5ca24c]
cmp ecx, ebx
je 0x5019d0
push ebp
call fcn.005331e0
jmp 0x501a0b
cmp dword [0xb084b8], ebx
jne 0x5019ff
mov edx, dword [str.Null_Pointer]
push edx
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
cmp eax, ebx
jne 0x5019ff
call fcn.0052ff20
mov ecx, dword [0xb084b8]
push ebp
call fcn.00533cb0
cmp dword [0xb084cc], ebx
je 0x501a79
mov ecx, dword [0xb084b8]
cmp ecx, ebx
jne 0x501a4a
mov eax, dword [str.Null_Pointer]
push eax
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov ecx, dword [0xb084b8]
add esp, 0xc
cmp ecx, ebx
jne 0x501a4a
call fcn.0052ff20
mov ecx, dword [0xb084b8]
mov eax, dword [ecx + 0x108]
push eax
call fcn.00533cd0
push ebx
push 1
push 8
call fcn.00401180
mov ecx, eax
call fcn.00533b80
mov esi, eax
call fcn.00401180
mov ecx, eax
call fcn.00533d40
mov eax, esi
jmp 0x501aa2
mov ecx, dword [0x5ca258]
mov ecx, dword [ecx*4 + 0x5ca24c]
cmp ecx, ebx
je 0x501a91
call fcn.005331c0
jmp 0x501aa2
push ebx
push 1
push 8
call fcn.00401180
mov ecx, eax
call fcn.00533b80
mov dword [esp + 0x10], eax
cmp eax, ebx
mov dword [esp + 0xb8], 4
je 0x501ac0
mov ecx, eax
call fcn.00415710
mov edi, eax
jmp 0x501ac2
xor edi, edi
mov edx, dword [esp + 0x3c]
mov ecx, edi
push edx
push str.text
mov dword [esp + 0xc0], 0xffffffff
call fcn.00416490
push 0xbc19c379
push str.font
mov ecx, edi
call fcn.00416ba0
push 0x1d944426
push ebx
mov ecx, edi
call fcn.00416a00
mov ebp, dword [0x589680]
push 0x174
call fcn.00401290
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, ebx
mov dword [esp + 0xb8], 5
je 0x501b2d
mov ecx, eax
call fcn.00479f40
mov esi, eax
jmp 0x501b2f
xor esi, esi
push ebp
mov ecx, esi
mov dword [esp + 0xbc], 0xffffffff
call fcn.00423320
mov ebp, dword [esp + 0x24]
push esi
mov ecx, ebp
mov eax, dword [ebp]
call dword [eax + 4]
mov edx, dword [esi]
push edi
mov ecx, esi
call dword [edx + 4]
lea eax, [esp + 0x54]
mov ecx, esi
push eax
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x58], esi
call fcn.004287d0
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x60]
push edx
mov dword [esp + 0xbc], 6
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x64], ecx
call fcn.004287d0
lea eax, [esp + 0x54]
push 1
lea ecx, [esp + 0x64]
push eax
push ecx
mov ecx, ebp
mov byte [esp + 0xc4], 7
call fcn.004747d0
mov ecx, dword [esp + 0x60]
mov byte [esp + 0xb8], 6
cmp ecx, ebx
je 0x501bcd
lea edx, [esp + 0x60]
push edx
call fcn.004287f0
mov dword [esp + 0x60], ebx
mov ecx, dword [esp + 0x54]
mov dword [esp + 0xb8], 0xffffffff
cmp ecx, ebx
je 0x501bee
lea eax, [esp + 0x54]
push eax
call fcn.004287f0
mov dword [esp + 0x54], ebx
cmp edi, ebx
je 0x501c5f
mov ecx, edi
call fcn.004159e0
cmp dword [0xb084cc], ebx
je 0x501c0b
push edi
call fcn.00401180
mov ecx, eax
jmp 0x501c5a
mov ecx, dword [0x5ca258]
mov ecx, dword [ecx*4 + 0x5ca24c]
cmp ecx, ebx
je 0x501c24
push edi
call fcn.005331e0
jmp 0x501c5f
cmp dword [0xb084b8], ebx
jne 0x501c53
mov edx, dword [str.Null_Pointer]
push edx
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
cmp eax, ebx
jne 0x501c53
call fcn.0052ff20
mov ecx, dword [0xb084b8]
push edi
call fcn.00533cb0
cmp dword [esp + 0x28], ebx
jne 0x501c6f
cmp dword [esp + 0x2c], ebx
je 0x501f0a
push 1
push str.goal_tetris_trick_text
call fcn.00419d00
mov ecx, dword [esp + 0x30]
add esp, 8
cmp ecx, ebx
jne 0x501c98
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x28]
push ebx
push ecx
push edx
mov ecx, eax
call fcn.00417ff0
cmp dword [0xb084cc], ebx
je 0x501d06
mov ecx, dword [0xb084b8]
cmp ecx, ebx
jne 0x501cd7
mov eax, dword [str.Null_Pointer]
push eax
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov ecx, dword [0xb084b8]
add esp, 0xc
cmp ecx, ebx
jne 0x501cd7
call fcn.0052ff20
mov ecx, dword [0xb084b8]
mov eax, dword [ecx + 0x108]
push eax
call fcn.00533cd0
push ebx
push 1
push 8
call fcn.00401180
mov ecx, eax
call fcn.00533b80
mov esi, eax
call fcn.00401180
mov ecx, eax
call fcn.00533d40
mov eax, esi
jmp 0x501d2f
mov ecx, dword [0x5ca258]
mov ecx, dword [ecx*4 + 0x5ca24c]
cmp ecx, ebx
je 0x501d1e
call fcn.005331c0
jmp 0x501d2f
push ebx
push 1
push 8
call fcn.00401180
mov ecx, eax
call fcn.00533b80
mov dword [esp + 0x10], eax
cmp eax, ebx
mov dword [esp + 0xb8], 8
je 0x501d4d
mov ecx, eax
call fcn.00415710
mov edi, eax
jmp 0x501d4f
xor edi, edi
mov edx, dword [esp + 0x28]
mov ecx, edi
push edx
push str.text
mov dword [esp + 0xc0], 0xffffffff
call fcn.00416490
push 0x8aba15ec
push str.font
mov ecx, edi
call fcn.00416ba0
push 0x1d944426
push ebx
mov ecx, edi
call fcn.00416a00
mov ebp, dword [0x589680]
push 0x174
call fcn.00401290
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, ebx
mov dword [esp + 0xb8], 9
je 0x501dba
mov ecx, eax
call fcn.00479f40
mov esi, eax
jmp 0x501dbc
xor esi, esi
push ebp
mov ecx, esi
mov dword [esp + 0xbc], 0xffffffff
call fcn.00423320
mov ebp, dword [esp + 0x24]
push esi
mov ecx, ebp
mov eax, dword [ebp]
call dword [eax + 4]
mov edx, dword [esi]
push edi
mov ecx, esi
call dword [edx + 4]
lea eax, [esp + 0x78]
mov ecx, esi
push eax
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x7c], esi
call fcn.004287d0
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x84]
push edx
mov dword [esp + 0xbc], 0xa
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x88], ecx
call fcn.004287d0
lea eax, [esp + 0x78]
push 1
lea ecx, [esp + 0x88]
push eax
push ecx
mov ecx, ebp
mov byte [esp + 0xc4], 0xb
call fcn.004747d0
mov ecx, dword [esp + 0x84]
mov byte [esp + 0xb8], 0xa
cmp ecx, ebx
je 0x501e78
lea edx, [esp + 0x84]
push edx
call fcn.004287f0
mov dword [esp + 0x84], ebx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0xb8], 0xffffffff
cmp ecx, ebx
je 0x501e99
lea eax, [esp + 0x78]
push eax
call fcn.004287f0
mov dword [esp + 0x78], ebx
cmp edi, ebx
je 0x501f0a
mov ecx, edi
call fcn.004159e0
cmp dword [0xb084cc], ebx
je 0x501eb6
push edi
call fcn.00401180
mov ecx, eax
jmp 0x501f05
mov ecx, dword [0x5ca258]
mov ecx, dword [ecx*4 + 0x5ca24c]
cmp ecx, ebx
je 0x501ecf
push edi
call fcn.005331e0
jmp 0x501f0a
cmp dword [0xb084b8], ebx
jne 0x501efe
mov edx, dword [str.Null_Pointer]
push edx
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
cmp eax, ebx
jne 0x501efe
call fcn.0052ff20
mov ecx, dword [0xb084b8]
push edi
call fcn.00533cb0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x34]
mov eax, dword [eax + 0x14]
mov dword [ecx + 0x74], eax
mov ecx, dword [edi + 0x2c4]
inc ecx
mov dword [edi + 0x2c4], ecx
mov eax, dword [0xb084cc]
cmp eax, ebx
je 0x501fcb
mov ecx, dword [0xb084b8]
cmp ecx, ebx
jne 0x501f6e
mov edx, dword [str.Null_Pointer]
push edx
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov ecx, dword [0xb084b8]
add esp, 0xc
cmp ecx, ebx
jne 0x501f6e
call fcn.0052ff20
mov ecx, dword [0xb084b8]
mov eax, dword [ecx + 0x108]
push eax
call fcn.00533cd0
push ebx
push 1
push 8
call fcn.00401180
mov ecx, eax
call fcn.00533b80
mov esi, eax
mov eax, dword [0xb084b8]
cmp eax, ebx
jne 0x501fbc
mov eax, dword [str.Null_Pointer]
push eax
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
cmp eax, ebx
jne 0x501fbc
call fcn.0052ff20
mov ecx, dword [0xb084b8]
call fcn.00533d40
mov eax, esi
jmp 0x501ff4
mov ecx, dword [0x5ca258]
mov ecx, dword [ecx*4 + 0x5ca24c]
cmp ecx, ebx
je 0x501fe3
call fcn.005331c0
jmp 0x501ff4
push ebx
push 1
push 8
call fcn.00401180
mov ecx, eax
call fcn.00533b80
mov dword [esp + 0x1c], eax
cmp eax, ebx
mov dword [esp + 0xb8], 0xc
je 0x502012
mov ecx, eax
call fcn.00415710
mov ebp, eax
jmp 0x502014
xor ebp, ebp
mov eax, dword [esp + 0x28]
mov dword [esp + 0xb8], 0xffffffff
cmp eax, ebx
jne 0x502034
push 0x7b716096
push ebx
mov ecx, ebp
call fcn.00416a00
push str.goal_tetris_add_trick
call fcn.00413eb0
mov ecx, dword [edi + 0x54]
add esp, 4
lea edx, [esp + 0x1c]
mov esi, eax
push ebx
push edx
push str.single_combo
mov dword [esp + 0x28], ebx
call fcn.004180b0
cmp dword [esp + 0x1c], ebx
jne 0x50209d
mov ecx, dword [edi + 0x54]
push str.single_combo
call fcn.004187c0
test al, al
jne 0x50209d
mov eax, dword [esp + 0x34]
fild dword [eax + 0x2c4]
fild dword [esp + 0x38]
fmul qword [0x58b4e0]
fcompp
fnstsw ax
test ah, 5
jp 0x50209d
push str.goal_tetris_add_red_trick
call fcn.00413eb0
add esp, 4
mov esi, eax
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push ebx
push ebx
push ebp
push esi
call fcn.004137e0
mov edi, eax
add esp, 0x24
mov ecx, dword [edi + 0x3dc]
lea esi, [edi + 0x3dc]
cmp ecx, ebx
je 0x5020c9
push esi
call fcn.004287f0
mov dword [esi], ebx
mov ecx, dword [esp + 0x14]
push esi
mov dword [esi], ecx
call fcn.004287d0
mov ecx, edi
call fcn.00412b90
cmp ebp, ebx
je 0x502153
mov ecx, ebp
call fcn.004159e0
cmp dword [0xb084cc], ebx
je 0x502100
cmp dword [0xb084b8], ebx
jne 0x502147
mov ecx, dword [str.Null_Pointer]
push ecx
jmp 0x502127
mov edx, dword [0x5ca258]
mov ecx, dword [edx*4 + 0x5ca24c]
cmp ecx, ebx
je 0x502119
push ebp
call fcn.005331e0
jmp 0x502153
cmp dword [0xb084b8], ebx
jne 0x502147
mov eax, dword [str.Null_Pointer]
push eax
push 0x158
push str.._sys_mem_memman.h
call fcn.00401090
mov eax, dword [0xb084b8]
add esp, 0xc
cmp eax, ebx
jne 0x502147
call fcn.0052ff20
mov ecx, dword [0xb084b8]
push ebp
call fcn.00533cb0
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x1c]
push ebx
push ecx
mov ecx, dword [esi + 0x54]
push str.single_combo
mov dword [esp + 0x28], ebx
call fcn.004180b0
cmp dword [esp + 0x1c], ebx
jne 0x50226d
mov ecx, dword [esi + 0x54]
push str.single_combo
call fcn.004187c0
test al, al
jne 0x50226d
fild dword [esi + 0x2c4]
fild dword [esp + 0x38]
fmul qword [0x58b4e0]
fcompp
fnstsw ax
test ah, 5
jp 0x50226d
mov ecx, dword [esi + 0x54]
push 1
push str.list_is_red
call fcn.00416800
lea eax, [esi + 0x74]
mov dword [esp + 0x10], 0x1e
mov dword [esp + 0x1c], eax
cmp byte [eax + 4], bl
jne 0x502257
mov edx, dword [eax]
mov ecx, dword [esp + 0x24]
push 1
lea eax, [esp + 0xa8]
push edx
push eax
call fcn.004748f0
mov ecx, dword [esp + 0xa4]
mov ebp, dword [eax]
cmp ecx, ebx
je 0x502208
lea edx, [esp + 0xa4]
push edx
call fcn.004287f0
mov dword [esp + 0xa4], ebx
push str.goal_tetris_turn_trick_red
call fcn.00413eb0
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push ebx
push ebx
push ebx
push eax
call fcn.004137e0
mov edi, eax
add esp, 0x28
mov ecx, dword [edi + 0x3dc]
lea esi, [edi + 0x3dc]
cmp ecx, ebx
je 0x50223e
push esi
call fcn.004287f0
mov dword [esi], ebx
cmp ebp, ebx
mov dword [esi], ebp
je 0x50224c
push esi
mov ecx, ebp
call fcn.004287d0
mov ecx, edi
call fcn.00412b90
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
add eax, 0x14
dec ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], ecx
jne 0x5021c8
mov eax, dword [esp + 0x20]
dec eax
cmp eax, ebx
mov dword [esp + 0x20], eax
jg 0x5015a1
pop ebp
mov ecx, dword [esp + 0xac]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0xac
ret