Function at 0x4c5250
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x6154c8
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x6b64f0]
xor eax, esp
mov dword [esp + 0x3c], eax
push esi
push edi
mov eax, dword [0x6b64f0]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x10], esi
mov edi, dword [ebp + 8]
mov dword [esp + 0x28], edi
call fcn.004bc1a0
test al, al
jne 0x4c59e1
call fcn.004c51f0
test al, al
je 0x4c5a19
cmp edi, 0xff
jb 0x4c52c8
push edi
push str.CPythonPlayer::__UseSkill_dwSlotIndex_d__Its_not_available_skill_slot_number
call fcn.005328e0
add esp, 8
jmp 0x4c5a19
lea eax, [edi + edi*4]
mov ecx, esi
push dword [esi + eax*8 + 0x141c0]
mov dword [esp + 0x30], eax
call fcn.004c5ee0
test al, al
jne 0x4c59e1
mov ecx, dword [0x70ed98]
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x30]
push dword [esi + eax*8 + 0x141c0]
call fcn.004cc7f0
test eax, eax
jne 0x4c5317
push edi
push str.CPythonPlayer::__UseSkill_dwSlotIndex_d__There_is_no_skill_data
call fcn.005328e0
add esp, 8
jmp 0x4c5a19
mov ecx, dword [esp + 0x14]
call fcn.004cfde0
test eax, eax
je 0x4c534c
push edi
mov ecx, esi
call fcn.004bb470
test eax, eax
je 0x4c534c
mov eax, dword [esp + 0x2c]
mov ecx, dword [0x70adf4]
push edi
push dword [esi + eax*8 + 0x141c0]
call fcn.004ad590
jmp 0x4c5a19
push edi
mov ecx, esi
call fcn.004c4ce0
test al, al
je 0x4c5a19
mov eax, dword [esi + 4]
lea ecx, [esi + 4]
mov dword [esp + 0xc], ecx
mov eax, dword [eax + 0x94]
call eax
mov esi, eax
mov dword [esp + 0x20], esi
test esi, esi
jne 0x4c538b
push edi
push str.CPythonPlayer::__UseSkill_dwSlotIndex_d__There_is_no_main_player
call fcn.005328e0
add esp, 8
jmp 0x4c5a19
mov ecx, esi
call fcn.00464f10
test eax, eax
jne 0x4c5a19
mov ecx, dword [esp + 0x14]
xor edi, edi
mov dword [esp + 0x24], edi
call fcn.004cfdd0
test eax, eax
jne 0x4c53c3
call fcn.004cfd80
test eax, eax
jne 0x4c53c3
call fcn.004cfdb0
test eax, eax
je 0x4c563e
call fcn.004cfdc0
mov ecx, dword [esp + 0x10]
test eax, eax
je 0x4c53d7
call fcn.004be0f0
jmp 0x4c53dc
call fcn.004be120
mov edi, eax
mov dword [esp + 0x24], edi
test edi, edi
jne 0x4c5501
mov edi, dword [esp + 0x10]
mov ecx, edi
call fcn.004be0b0
mov ecx, dword [esp + 0x14]
call fcn.004cfdc0
mov ecx, edi
test eax, eax
je 0x4c540b
call fcn.004be0f0
jmp 0x4c5410
call fcn.004be120
mov edi, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], edi
test edi, edi
jne 0x4c5501
mov ecx, dword [esp + 0x14]
call fcn.004cfdb0
test eax, eax
je 0x4c54bf
movss xmm2, dword [0x672590]
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.00463f90
test al, al
je 0x4c54b5
mov esi, dword [esp + 0xc]
mov edi, dword [esp + 0x1c]
mov ecx, edi
push 1
mov esi, dword [esi]
call fcn.00461470
mov ecx, dword [esp + 0x10]
push eax
call dword [esi + 0x6c]
push dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
push eax
push edi
mov edi, dword [esp + 0x1c]
mov ecx, edi
push esi
call fcn.004c50c0
test al, al
je 0x4c5a19
mov ecx, dword [esp + 0x14]
call fcn.004cfe60
test eax, eax
je 0x4c54c5
mov edi, esi
mov ecx, esi
push esi
mov dword [esp + 0x28], edi
call fcn.00463b90
push str.__ALERT__
call fcn.00532850
add esp, 4
jmp 0x4c563e
push str.NEED_TARGET
jmp 0x4c59ea
mov edi, dword [esp + 0x10]
jmp 0x4c548c
call fcn.004cfdc0
lea ecx, [edi + 4]
test eax, eax
mov eax, dword [ecx]
mov eax, dword [eax + 4]
je 0x4c54fa
push str.ONLY_FOR_CORPSE
call eax
push eax
push str._is_
call dword [sym.imp.python22.dll_Py_BuildValue]
add esp, 0xc
push eax
push str.OnCannotUseSkill
push dword [edi + 8]
jmp 0x4c5a11
push str.NEED_TARGET
jmp 0x4c54db
mov ecx, dword [esp + 0x14]
call fcn.004cfe50
test eax, eax
je 0x4c55d7
cmp esi, edi
jne 0x4c552d
call fcn.004cfe60
test eax, eax
jne 0x4c5618
push str.CANNOT_USE_SELF
jmp 0x4c59ea
push edi
mov ecx, esi
call fcn.00460df0
test al, al
jne 0x4c55ab
mov ecx, edi
call fcn.00461210
test eax, eax
je 0x4c55ab
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push eax
call fcn.004c50a0
mov dword [esp + 0x18], eax
test eax, eax
je 0x4c5618
push edi
mov ecx, esi
call fcn.00461500
mov ecx, dword [esp + 0x18]
movaps xmm2, xmm0
mov eax, ecx
shr eax, 0x1f
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
addsd xmm1, qword [eax*8 + 0x672740]
cvtpd2ps xmm0, xmm1
comiss xmm2, xmm0
jb 0x4c5618
push ecx
push dword [esp + 0x2c]
mov ecx, edi
call fcn.00461470
mov ecx, dword [esp + 0x18]
push eax
call fcn.004bed40
jmp 0x4c5a19
mov ecx, dword [esp + 0x14]
call fcn.004cfe60
test eax, eax
je 0x4c55cd
mov edi, esi
push str.__ALERT_
mov dword [esp + 0x28], edi
call fcn.00532850
add esp, 4
jmp 0x4c5618
push str.ONLY_FOR_ALLIANCE
jmp 0x4c59ea
mov ecx, edi
call fcn.0045e960
test eax, eax
je 0x4c55ec
push str.CANNOT_ATTACK_ENEMY_IN_SAFE_AREA
jmp 0x4c59ea
push edi
mov ecx, esi
call fcn.00460df0
test al, al
je 0x4c59e5
push dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push edi
push esi
call fcn.004c50c0
test al, al
je 0x4c5a19
push edi
mov ecx, esi
call fcn.00463b90
cmp esi, edi
je 0x4c563e
mov ecx, esi
call fcn.00463b70
mov ecx, esi
test al, al
je 0x4c5638
call fcn.00469d00
jmp 0x4c563e
push edi
call fcn.00469d50
mov ecx, dword [esp + 0x14]
call fcn.004cfd80
test eax, eax
je 0x4c56af
test edi, edi
je 0x4c565d
cmp edi, esi
je 0x4c565d
push edi
mov ecx, esi
call fcn.00469d50
jmp 0x4c56af
lea eax, [esp + 0x18]
push eax
call fcn.004b9520
test al, al
je 0x4c5682
push dword [esp + 0x18]
call fcn.004b9670
test eax, eax
je 0x4c56af
push eax
mov ecx, esi
call fcn.00469d50
jmp 0x4c56af
lea eax, [esp + 0x30]
push eax
call fcn.004b9540
test al, al
je 0x4c569e
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.00469d10
jmp 0x4c56af
push dword [esp + 0x28]
push str.CPythonPlayer::__UseSkill__d____
call fcn.005328e0
add esp, 8
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
movss xmm1, dword [eax + ecx*8 + 0x141d0]
mov ecx, dword [esp + 0x14]
call fcn.004d0820
push dword [esp + 0x14]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
call fcn.004c50a0
cmp dword [esp + 0xc], 0
mov dword [esp + 0x18], eax
jbe 0x4c5935
test edi, edi
je 0x4c5935
mov edx, 1
mov dword [esp + 0x30], 0
mov dword [esp + 0x1c], edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x58], 0
mov ecx, dword [esp + 0x14]
call fcn.004cfd90
test eax, eax
je 0x4c57f6
lea eax, [esp + 0x30]
mov ecx, esi
push eax
mov eax, dword [esp + 0x1c]
push edi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x672740]
cvtpd2ps xmm1, xmm0
call fcn.00464190
test al, al
je 0x4c58c6
mov esi, dword [esp + 0x30]
mov edx, 1
cmp esi, dword [esp + 0x34]
je 0x4c57ed
mov eax, dword [esp + 0xc]
cmp edx, eax
jae 0x4c5924
mov ecx, dword [esi]
mov dword [esp + 0x18], ecx
cmp edi, ecx
je 0x4c57e4
call fcn.0045f590
test eax, eax
jne 0x4c57dc
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
push edi
call fcn.00463cb0
mov ecx, edi
call fcn.004615c0
mov edi, dword [0x70adf4]
lea edx, [esp + 0x3c]
push edx
lea ecx, [eax + 0x2b4]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov ecx, dword [esp + 0x18]
push eax
call fcn.00461470
push eax
mov ecx, edi
call fcn.004afe40
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
inc edx
mov dword [esp + 0x1c], edx
jmp 0x4c57e0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0xc]
add esi, 4
cmp esi, dword [esp + 0x34]
jne 0x4c5773
mov esi, dword [esp + 0x20]
jmp 0x4c58cb
call fcn.004cfda0
test eax, eax
je 0x4c58cb
lea eax, [esp + 0x30]
mov ecx, esi
push eax
mov eax, dword [esp + 0x1c]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x672740]
cvtpd2ps xmm1, xmm0
call fcn.004644b0
test al, al
je 0x4c58c6
mov esi, dword [esp + 0x30]
mov edx, 1
cmp esi, dword [esp + 0x34]
je 0x4c57ed
mov eax, dword [esp + 0xc]
cmp edx, eax
jae 0x4c5924
mov ecx, dword [esi]
mov dword [esp + 0x18], ecx
cmp edi, ecx
je 0x4c58b7
call fcn.0045f590
test eax, eax
jne 0x4c58af
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
push edi
call fcn.00463cb0
mov ecx, edi
call fcn.004615c0
mov edi, dword [0x70adf4]
lea edx, [esp + 0x3c]
push edx
lea ecx, [eax + 0x2b4]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov ecx, dword [esp + 0x18]
push eax
call fcn.00461470
push eax
mov ecx, edi
call fcn.004afe40
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x24]
inc edx
mov dword [esp + 0x1c], edx
jmp 0x4c58b3
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0xc]
add esi, 4
cmp esi, dword [esp + 0x34]
jne 0x4c5846
mov esi, dword [esp + 0x20]
jmp 0x4c58cb
mov edx, 1
mov eax, dword [esp + 0xc]
cmp edx, eax
jae 0x4c5924
sub eax, edx
mov dword [esp + 0xc], eax
lea esp, [esp]
lea eax, [esp + 0x3c]
mov ecx, esi
push eax
push edi
call fcn.00463eb0
movss xmm0, dword [esp + 0x40]
lea eax, [esp + 0x3c]
xorps xmm0, xmmword [0x672760]
mov ecx, esi
push eax
movss dword [esp + 0x44], xmm0
call fcn.00463c30
mov ecx, dword [0x70adf4]
lea eax, [esp + 0x3c]
push eax
push 0
call fcn.004afe40
dec dword [esp + 0xc]
jne 0x4c58e0
lea ecx, [esp + 0x30]
mov dword [esp + 0x58], 0xffffffff
call fcn.0045b7b0
mov edx, dword [esp + 0x10]
mov ecx, edx
call fcn.004beca0
mov ecx, dword [esp + 0x14]
call fcn.00481a50
test eax, eax
jne 0x4c59b6
mov eax, dword [esp + 0x2c]
push dword [edx + eax*8 + 0x141c8]
call fcn.004d0950
mov esi, eax
mov eax, dword [esp + 0x2c]
movss xmm1, dword [edx + eax*8 + 0x141d0]
call fcn.004d09c0
mov ecx, dword [esp + 0x14]
mov edx, eax
call fcn.004cfed0
test eax, eax
mov eax, dword [esp + 0x2c]
setne cl
movzx ecx, cl
push ecx
mov ecx, dword [esp + 0x24]
push edx
push esi
mov esi, dword [esp + 0x1c]
push dword [esi + eax*8 + 0x141c0]
call fcn.004647f0
test al, al
jne 0x4c59b8
push dword [esp + 0x28]
push str.CPythonPlayer::__UseSkill__d____pkInstMain__NEW_UseSkill___ERROR
call fcn.005328e0
add esp, 8
jmp 0x4c5a19
mov esi, edx
test edi, edi
je 0x4c59d3
mov ecx, edi
call fcn.00461470
push eax
push dword [esp + 0x2c]
mov ecx, esi
call fcn.004c5a40
mov al, 1
jmp 0x4c5a1b
xor eax, eax
mov ecx, esi
push eax
push dword [esp + 0x2c]
call fcn.004c5a40
mov al, 1
jmp 0x4c5a1b
push str.CANNOT_ATTACK
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
push eax
push str._is_
call dword [sym.imp.python22.dll_Py_BuildValue]
add esp, 0xc
push eax
mov eax, dword [esp + 0x14]
push str.OnCannotUseSkill
push dword [eax + 8]
call fcn.005c9640
add esp, 0xc
xor al, al
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x3c]
xor ecx, esp
call fcn.005d67d1
mov esp, ebp
pop ebp
ret 4