Function at 0x4039ae
Capabilities:
Print debug messages

Disassembly:
jmp 0x4d4bb0
sub esp, 0x10c
mov edx, dword [0x5552b0]
push ebx
push ebp
mov ebp, dword [esp + 0x118]
mov ecx, dword [edx + 0x5524]
push esi
mov esi, dword [esp + 0x120]
push edi
lea eax, [ecx + ecx*2]
mov edi, dword [edx + 0x5d0]
lea eax, [eax + eax*4]
shl eax, 5
add eax, ecx
lea ebx, [edx + eax*4 + 0x698]
lea eax, [ebp + ebp*2]
shl eax, 3
sub eax, ebp
lea eax, [eax + eax*2]
lea eax, [edi + eax*4]
mov dword [esp + 0x10], eax
lea eax, [esi + esi*2]
shl eax, 3
sub eax, esi
lea eax, [eax + eax*2]
lea eax, [edi + eax*4]
mov edi, dword [ebx + 0x6c]
cmp edi, 3
mov dword [esp + 0x18], eax
jge 0x4d4c4a
mov edx, dword [edx + 0x59fc]
mov ebx, dword [ebx + 0x38]
mov eax, 0x66666667
mov dword [esp + 0x14], edx
imul ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [esp + 0x14]
cmp eax, edx
jle 0x4d4c4a
add edi, 3
cmp eax, edi
jg 0x4d4e2c
push ecx
push 0
push esi
call fcn.00402fef
add esp, 0xc
cmp eax, 1
jne 0x4d4c7a
mov ecx, dword [0x5552b0]
mov eax, dword [esp + 0x18]
push 5
mov edx, dword [ecx + 0x5524]
mov ecx, dword [eax + 0x48]
push edx
push ecx
call fcn.00401429
add esp, 0xc
mov ebx, dword [esp + 0x128]
test ebx, ebx
jle 0x4d4e2c
mov ecx, 0x3f
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [esp + 0x12c]
lea edx, [esp + 0x1c]
push edi
push str.Attack_option_selected:__d_n
push edx
call fcn.0050fb85
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push esi
push ebp
call fcn.00401ac8
add esp, 0xc
cmp eax, 1
jne 0x4d4cff
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
push edi
mov edx, dword [ecx]
mov ecx, dword [eax]
push edx
push ecx
lea edx, [esp + 0x28]
push str.Discarded_battle_From:__s__To:__s_with_Option:__d_n
push edx
call fcn.0050fb85
add esp, 0x14
lea eax, [esp + 0x1c]
push 0xffffffffffffffff
push eax
jmp 0x4d4e21
mov eax, dword [0x5552b0]
mov ecx, dword [eax + 0x59fc]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*8 + 0x4474]
mov dword [eax], ebp
mov dword [eax + 4], esi
mov dword [eax + 0x14], ebx
mov dword [eax + 8], edi
mov edx, dword [0x5552b0]
mov ebp, dword [esp + 0x18]
mov ecx, dword [edx + 0x59fc]
mov edx, dword [esp + 0x130]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x24], 0x457
mov dword [eax + 0x20], edx
mov eax, dword [0x5552b0]
mov esi, dword [eax + 0x59fc]
inc esi
mov dword [eax + 0x59fc], esi
mov esi, dword [esp + 0x10]
mov edx, dword [esi + 0x108]
add edx, ebx
mov dword [esi + 0x108], edx
mov ecx, dword [ebp + 0x104]
add ecx, ebx
mov dword [ebp + 0x104], ecx
mov eax, dword [0x546a8c]
test eax, eax
je 0x4d4e2c
mov edx, dword [0x5552b0]
mov eax, dword [edx + 0xc4]
lea ecx, [eax + eax*2]
lea ecx, [ecx + ecx*4]
shl ecx, 5
add ecx, eax
lea edx, [edx + ecx*4 + 0x698]
mov ecx, eax
shl ecx, 5
add ecx, eax
mov dword [esp + 0x10], edx
lea edx, [eax + ecx*2]
mov eax, dword [edx*4 + 0x552dc4]
push eax
call fcn.00403210
mov ecx, dword [0x5469ac]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x20]
mov edx, dword [ecx + 0x70]
push edx
push str.ST_Attacks_round:__d....
push eax
call fcn.0050fb85
add esp, 0x10
lea ecx, [esp + 0x1c]
push 0xffffffffffffffff
push ecx
mov ecx, dword [0x5552b0]
call fcn.00401f91
mov edx, dword [ebp]
mov eax, dword [esi]
mov ecx, dword [esp + 0x130]
push ebx
push edx
mov edx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edi
push edx
push eax
lea ecx, [esp + 0x38]
push str._s__s__OPTION__d__d__From__s_to__s_with__d_batts._n
push ecx
call fcn.0050fb85
add esp, 0x24
lea edx, [esp + 0x1c]
push 0xffffffffffffffff
push edx
mov ecx, dword [0x5552b0]
call fcn.00401f91
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret