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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c0
mov ecx, dword [0x5050e8]
mov eax, ecx
cdq
sub eax, edx
push ebx
push ebp
push esi
mov esi, eax
sar esi, 1
lea eax, [esi - 0x46]
sub ecx, eax
mov dword [esp + 0xc], eax
add ecx, 0x14
push edi
lea edi, [eax - 0x14]
mov ebp, ecx
mov eax, 0x4f5a70
mov dword [esp + 0x40], eax
mov dword [esp + 0xf0], eax
lea eax, [esp + 0x24]
mov dword [esp + 0xa8], eax
lea ecx, [esp + 0x40]
mov dword [esp + 0xac], ecx
lea eax, [esp + 0x98]
lea ecx, [esp + 0xf0]
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], ecx
mov eax, str.Dummy_control
lea edx, [esp + 0x88]
mov dword [esp + 0xb0], edx
lea ecx, [esp + 0xd0]
lea edx, [esp + 0x24]
mov dword [esp + 0xbc], eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0xa8]
lea ecx, [esp + 0x50]
mov dword [esp + 0x50], edx
mov dword [esp + 0x38], edx
lea edx, [esp + 0x38]
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], ecx
lea eax, [esp + 0xbc]
lea ecx, [esp + 0x48]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x24], str.Cooperative
mov dword [esp + 0x28], 0x4f5c6c
mov dword [esp + 0x2c], str.Manual
mov dword [esp + 0x44], str.Auto
mov dword [esp + 0x88], str.Stand
mov dword [esp + 0x8c], str.Crouch
mov dword [esp + 0x90], str.Jump
mov dword [esp + 0x94], str.W_Jump
mov dword [esp + 0x98], 0x4f5ca0
mov dword [esp + 0x9c], str.Close
mov dword [esp + 0xa0], 0x4f5a60
mov dword [esp + 0xa4], 0x4f5cac
mov dword [esp + 0xf4], str.ACLS
mov dword [esp + 0xf8], str.BXYZ
mov dword [esp + 0xfc], 0x4f4560
mov dword [esp + 0x100], 0x4f5ba8
mov dword [esp + 0x104], 0x4f5bac
mov dword [esp + 0x108], 0x4f5bb0
mov dword [esp + 0x10c], 0x4f5bb4
mov dword [esp + 0xc0], str.Guard_mode
mov dword [esp + 0xc4], str.Dummy_mode
mov dword [esp + 0xc8], str.Distance
mov dword [esp + 0xcc], str.Button_jam
mov dword [esp + 0xd0], 0x4f40a0
mov dword [esp + 0xd4], 0x4f409c
mov dword [esp + 0xd8], 0x4f4098
mov dword [esp + 0xdc], 0x4f4094
mov dword [esp + 0xe0], 0x4f4090
mov dword [esp + 0xe4], 0x4f408c
mov dword [esp + 0xe8], 0x4f4088
mov dword [esp + 0xec], 0x4f4084
mov dword [esp + 0x4c], str.AI_Level
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], ecx
lea edx, [esp + 0x3c]
mov eax, dword [0x5040e8]
mov ebx, dword [eax + 0x12e78]
lea ecx, [eax + 0x12e7c]
mov dword [esp + 0x7c], ecx
lea ecx, [eax + 0x12e90]
add eax, 0x12e98
mov dword [esp + 0x84], eax
mov eax, dword [0x504224]
mov dword [esp + 0x60], edx
mov edx, 1
mov dword [esp + 0x70], 5
mov dword [esp + 0x74], 2
mov dword [esp + 0x78], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x80], ecx
cmp eax, 2
je 0x42dddc
cmp eax, 3
jne 0x42dde3
mov eax, 0x180000
jmp 0x42de17
mov eax, dword [0x5042a4]
mov ecx, dword [eax]
mov eax, dword [ecx + 4]
imul eax, dword [0x5042a8]
add eax, dword [ecx + 0x18]
je 0x42de03
cmp dword [eax + 0x1c], edx
jne 0x42de03
mov eax, dword [eax + 0x24]
jmp 0x42de05
xor eax, eax
mov ecx, dword [eax + 4]
push 0x18
push 0
push 0
push ecx
call sub.SDL.dll_SDL_MapRGB
add esp, 0x10
push 0x80
push 0x100
push eax
push 0x96
push ebp
push 0x1e
push edi
call dword [0x500e98]
mov eax, dword [0x504224]
add esp, 0x1c
cmp eax, 2
je 0x42de43
cmp eax, 3
jne 0x42de4a
mov eax, 0x805050
jmp 0x42de83
mov edx, dword [0x5042a4]
mov ecx, dword [edx]
mov eax, dword [ecx + 4]
imul eax, dword [0x5042a8]
add eax, dword [ecx + 0x18]
je 0x42de6c
cmp dword [eax + 0x1c], 1
jne 0x42de6c
mov eax, dword [eax + 0x24]
jmp 0x42de6e
xor eax, eax
mov eax, dword [eax + 4]
push 0x80
push 0x50
push 0x50
push eax
call sub.SDL.dll_SDL_MapRGB
add esp, 0x10
push eax
push 0x97
lea ecx, [ebp + 1]
push ecx
lea edx, [edi - 1]
push 0x1d
push edx
call dword [0x500e20]
mov eax, dword [0x504224]
add esp, 0x14
cmp eax, 2
je 0x42deab
cmp eax, 3
jne 0x42deb2
mov eax, 0xf0c0c0
jmp 0x42def0
mov eax, dword [0x5042a4]
mov ecx, dword [eax]
mov eax, dword [ecx + 4]
imul eax, dword [0x5042a8]
add eax, dword [ecx + 0x18]
je 0x42ded3
cmp dword [eax + 0x1c], 1
jne 0x42ded3
mov eax, dword [eax + 0x24]
jmp 0x42ded5
xor eax, eax
mov ecx, dword [eax + 4]
push pe_nt_image_headers32
push 0xc0
push 0xc0
push ecx
call sub.SDL.dll_SDL_MapRGB
add esp, 0x10
push eax
push 0x96
push ebp
push 0x1e
push edi
call dword [0x500e20]
mov edx, dword [0x5040e8]
mov eax, dword [edx + 0x873c]
push 0
push 0
push 0
push 0
push 0
push 0x29
push esi
push eax
push str.Training_Menu
call fcn.0046ce40
mov ecx, dword [0x5040e8]
mov edx, dword [ecx + 0x873c]
push 0x100
push 0x100
push 0x100
push 0
push 0
push 0x28
dec esi
push esi
push edx
push str.Training_Menu
call fcn.0046ce40
mov eax, dword [esp + ebx*4 + 0xcc]
mov ebp, dword [esp + ebx*4 + 0xd8]
add esp, 0x5c
mov dword [esp + 0x14], 0
mov dword [ebp], ebx
mov dword [esp + 0x34], eax
test eax, eax
jle 0x42e24f
mov eax, dword [esp + 0x10]
mov esi, dword [esp + ebx*4 + 0x58]
inc eax
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
mov edi, 0x3c
sub ebp, esi
fstp dword [esp + 0x30]
jmp 0x42dfa0
push 0x60
lea ecx, [esp + 0x114]
push 0
push ecx
call sub.MSVCR90.dll_memset
fld1
mov ecx, dword [0x5040e8]
fst dword [esp + 0x140]
fst dword [esp + 0x13c]
push 0
fst dword [esp + 0x134]
push 0
fst dword [esp + 0x134]
lea edx, [edi + 1]
fst dword [esp + 0x174]
mov dword [esp + 0x30], edx
mov edx, dword [ecx + 0x873c]
fst dword [esp + 0x164]
fst dword [esp + 0x160]
push 0
fstp dword [esp + 0x128]
push 0
fld dword [0x4fd888]
push 1
fstp dword [esp + 0x134]
lea eax, [esp + 0x130]
fld dword [esp + 0x50]
push eax
mov eax, dword [esi]
fstp dword [esp + 0x13c]
fild dword [esp + 0x40]
push edx
mov dword [esp + 0x194], 0xffff
mov dword [esp + 0x184], 1
fstp dword [esp + 0x40]
fld dword [esp + 0x40]
fstp dword [esp + 0x144]
call fcn.0046ca80
mov eax, dword [esi + ebp]
add esp, 0x28
cmp eax, 0xffffffff
je 0x42e189
mov ecx, dword [esp + ebx*4 + 0x64]
mov edx, dword [esp + 0x14]
push 0
push 0
push 0
lea ebx, [ecx + edx*4]
mov ecx, dword [esp + 0x28]
mov edx, dword [0x5040e8]
push 0
push 1
push ecx
mov ecx, dword [esp + 0x28]
add ecx, 0x5b
push ecx
mov ecx, dword [edx + 0x873c]
mov edx, dword [ebx]
mov eax, dword [edx + eax*4]
push ecx
push eax
call fcn.0046ce40
mov eax, dword [0x5040e8]
mov ecx, dword [esp + 0x38]
add esp, 0x24
cmp dword [eax + 0x12e6c], ecx
jne 0x42e121
mov edx, dword [esp + 0x10]
mov eax, dword [eax + 0x873c]
mov ecx, dword [esi]
push 0x100
push 0x100
push 0x100
push 0
push 1
push edi
push edx
push eax
push ecx
call fcn.0046ce40
mov eax, dword [esp + 0x34]
mov edx, dword [0x5040e8]
mov ecx, dword [esi + ebp]
push 0xc8
push 0x100
push 0x100
push 0
push 1
add eax, 0x5a
push edi
push eax
mov eax, dword [edx + 0x873c]
mov edx, dword [ebx]
push eax
mov eax, dword [edx + ecx*4]
push eax
call fcn.0046ce40
mov ebx, dword [esp + 0x68]
add esp, 0x48
jmp 0x42e236
mov ecx, dword [esp + 0x10]
mov edx, dword [eax + 0x873c]
mov eax, dword [esi]
push 0x80
push 0x80
push 0x80
push 0
push 1
push edi
push ecx
push edx
push eax
call fcn.0046ce40
mov eax, dword [esp + 0x34]
mov ecx, dword [0x5040e8]
mov edx, dword [ecx + 0x873c]
mov ecx, dword [ebx]
push 0
push 0x100
push 0x100
push 0
push 1
push edi
add eax, 0x5a
push eax
mov eax, dword [esi + ebp]
push edx
mov edx, dword [ecx + eax*4]
push edx
call fcn.0046ce40
mov ebx, dword [esp + 0x68]
add esp, 0x48
jmp 0x42e236
push 0x60
lea eax, [esp + 0x174]
push 0
push eax
call sub.MSVCR90.dll_memset
fld1
mov edx, dword [0x5040e8]
fst dword [esp + 0x1a0]
mov eax, dword [edx + 0x873c]
fst dword [esp + 0x19c]
fst dword [esp + 0x190]
push 0x64
fst dword [esp + 0x190]
push 0x64
fst dword [esp + 0x1d4]
push 0x64
fst dword [esp + 0x1c8]
push 0
fst dword [esp + 0x1c8]
push 1
fstp dword [esp + 0x190]
lea ecx, [esp + 0x190]
fld dword [0x4fd888]
push ecx
fstp dword [esp + 0x198]
push eax
fild dword [esp + 0x38]
mov eax, dword [esi]
mov dword [esp + 0x1f4], 0xffff
mov dword [esp + 0x1e4], 1
fstp dword [esp + 0x1a0]
fld dword [esp + 0x40]
fstp dword [esp + 0x1a4]
call fcn.0046ca80
add esp, 0x28
mov eax, dword [esp + 0x14]
inc eax
add edi, 0x14
add esi, 4
cmp eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
jl 0x42dfa0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret