Function at 0x4c7870
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x61a4dd
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x69bd40]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x58], edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x40], esi
call fcn.004ba200
test al, al
jne 0x4c7fe4
mov ecx, edi
call fcn.004c6fe0
test al, al
je 0x4c78d3
cmp esi, 0xff
jb 0x4c78da
push esi
push str.CPythonPlayer::__UseSkill_dwSlotIndex_d__Its_not_available_skill_slot_number
call fcn.004f70a0
add esp, 8
xor al, al
jmp 0x4c7fe6
lea eax, [esi + esi*4]
mov ecx, edi
push dword [edi + eax*8 + 0x11970]
mov dword [ebp - 0x48], eax
call fcn.004c7370
test al, al
jne 0x4c7fe4
mov ecx, dword [0x6ab7d4]
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x48]
push dword [edi + eax*8 + 0x11970]
call fcn.004d2260
test eax, eax
jne 0x4c7928
push esi
push str.CPythonPlayer::__UseSkill_dwSlotIndex_d__There_is_no_skill_data
call fcn.004f70a0
add esp, 8
xor al, al
jmp 0x4c7fe6
mov ecx, dword [ebp - 0x2c]
call fcn.004d2750
test eax, eax
je 0x4c795d
push esi
mov ecx, edi
call fcn.004ba3b0
test eax, eax
je 0x4c795d
mov eax, dword [ebp - 0x48]
mov ecx, dword [0x6a62c4]
push esi
push dword [edi + eax*8 + 0x11970]
call fcn.004b2180
xor al, al
jmp 0x4c7fe6
push esi
mov ecx, edi
call fcn.004c7150
test al, al
je 0x4c78d3
mov eax, dword [edi + 4]
lea ecx, [edi + 4]
mov eax, dword [eax + 0xa0]
call eax
mov esi, eax
mov dword [ebp - 0x3c], esi
test esi, esi
jne 0x4c799b
push dword [ebp - 0x40]
push str.CPythonPlayer::__UseSkill_dwSlotIndex_d__There_is_no_main_player
call fcn.004f70a0
add esp, 8
xor al, al
jmp 0x4c7fe6
mov ecx, esi
call fcn.00466fc0
test eax, eax
jne 0x4c78d3
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
call fcn.004d2700
test eax, eax
jne 0x4c79d5
mov ecx, dword [ebp - 0x2c]
call fcn.004d1630
test eax, eax
jne 0x4c79d5
mov ecx, dword [ebp - 0x2c]
call fcn.004d2640
test eax, eax
je 0x4c7c48
mov ecx, dword [ebp - 0x2c]
call fcn.004d26d0
mov ecx, edi
test eax, eax
je 0x4c79ea
call fcn.004bd320
jmp 0x4c79ef
call fcn.004bd2f0
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x4c7ad9
mov ecx, edi
call fcn.004bd290
mov ecx, dword [ebp - 0x2c]
call fcn.004d26d0
mov ecx, edi
test eax, eax
je 0x4c7a16
call fcn.004bd320
jmp 0x4c7a1b
call fcn.004bd2f0
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x4c7ad9
mov ecx, dword [ebp - 0x2c]
call fcn.004d2640
test eax, eax
je 0x4c7a7f
push ecx
lea eax, [ebp - 0x30]
mov dword [esp], 0x44fa0000
push eax
mov ecx, esi
call fcn.00467230
mov edx, dword [edi + 4]
lea ecx, [edi + 4]
mov dword [ebp - 0x34], edx
test al, al
je 0x4c7aa8
mov ecx, dword [ebp - 0x30]
push 1
call fcn.00461cd0
push eax
mov eax, dword [ebp - 0x34]
lea ecx, [edi + 4]
call dword [eax + 0x78]
push dword [ebp - 0x40]
mov ecx, edi
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push esi
call fcn.004c75c0
test al, al
je 0x4c78d3
mov ecx, dword [ebp - 0x2c]
call fcn.004d1640
test eax, eax
je 0x4c7ab2
push esi
mov ecx, esi
mov dword [ebp - 0x30], esi
call fcn.00467e60
push str.__ALERT__The_target_is_set_to_yourself_n
call fcn.004f7000
add esp, 4
jmp 0x4c7c48
mov eax, dword [edx + 4]
push str.NEED_TARGET
jmp 0x4c7b0e
mov ecx, dword [ebp - 0x2c]
call fcn.004d26d0
mov ecx, dword [edi + 4]
mov esi, dword [ecx + 4]
lea ecx, [edi + 4]
test eax, eax
je 0x4c7ad0
push str.ONLY_FOR_CORPSE
call esi
jmp 0x4c7b10
push str.NEED_TARGET
call esi
jmp 0x4c7b10
mov ecx, dword [ebp - 0x2c]
call fcn.004d2710
test eax, eax
je 0x4c7bdc
mov eax, dword [ebp - 0x30]
cmp esi, eax
jne 0x4c7b34
mov ecx, dword [ebp - 0x2c]
call fcn.004d1640
test eax, eax
jne 0x4c7c1d
push str.CANNOT_USE_SELF
mov eax, dword [edi + 4]
lea ecx, [edi + 4]
mov eax, dword [eax + 4]
call eax
push eax
push str._is_
call dword [sym.imp.python27.dll_Py_BuildValue]
push eax
push str.OnCannotUseSkill
push dword [edi + 8]
call fcn.005912c0
add esp, 0x18
xor al, al
jmp 0x4c7fe6
push eax
mov ecx, esi
call fcn.00461d90
test al, al
jne 0x4c7bb4
mov ecx, dword [ebp - 0x30]
call fcn.00462300
test eax, eax
je 0x4c7bb4
push dword [ebp - 0x2c]
mov ecx, edi
call fcn.004c7430
mov dword [ebp - 0x34], eax
test eax, eax
je 0x4c7c1d
push dword [ebp - 0x30]
mov ecx, esi
call fcn.00461a40
mov ecx, dword [ebp - 0x34]
mov eax, ecx
shr eax, 0x1f
fstp dword [ebp - 0x44]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
addsd xmm0, qword [eax*8 + 0x62d680]
cvtpd2ps xmm1, xmm0
movss xmm0, dword [ebp - 0x44]
comiss xmm0, xmm1
jb 0x4c7c1d
push ecx
push dword [ebp - 0x40]
mov ecx, dword [ebp - 0x30]
call fcn.00461cd0
push eax
mov ecx, edi
call fcn.004bd970
xor al, al
jmp 0x4c7fe6
mov ecx, dword [ebp - 0x2c]
call fcn.004d1640
test eax, eax
je 0x4c7bd2
push str.__ALERT__Used_on_you__and_the_enemy_target_is_changed_to_yourself_n
mov dword [ebp - 0x30], esi
call fcn.004f7000
add esp, 4
jmp 0x4c7c1d
push str.ONLY_FOR_ALLIANCE
jmp 0x4c7b05
mov ecx, dword [ebp - 0x30]
call fcn.004621f0
test eax, eax
je 0x4c7bf2
push str.CANNOT_ATTACK_ENEMY_IN_SAFE_AREA
jmp 0x4c7b05
push dword [ebp - 0x30]
mov ecx, esi
call fcn.00461d90
test al, al
je 0x4c8003
push dword [ebp - 0x40]
mov ecx, edi
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push esi
call fcn.004c75c0
test al, al
je 0x4c78d3
push dword [ebp - 0x30]
mov ecx, esi
call fcn.00467e60
cmp esi, dword [ebp - 0x30]
je 0x4c7c48
mov ecx, esi
call fcn.00466fa0
mov ecx, esi
test al, al
je 0x4c7c40
call fcn.0046cba0
jmp 0x4c7c48
push dword [ebp - 0x30]
call fcn.0046cb40
mov ecx, dword [ebp - 0x2c]
call fcn.004d1630
test eax, eax
je 0x4c7cba
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4c7c69
cmp eax, esi
je 0x4c7c69
push eax
mov ecx, esi
call fcn.0046cb40
jmp 0x4c7cba
lea eax, [ebp - 0x34]
mov ecx, edi
push eax
call fcn.004bbab0
mov ecx, edi
test al, al
je 0x4c7c90
push dword [ebp - 0x34]
call fcn.004ba710
test eax, eax
je 0x4c7cba
push eax
mov ecx, esi
call fcn.0046cb40
jmp 0x4c7cba
lea eax, [ebp - 0x28]
push eax
call fcn.004bbaf0
test al, al
je 0x4c7caa
lea eax, [ebp - 0x28]
mov ecx, esi
push eax
call fcn.0046cb60
jmp 0x4c7cba
push dword [ebp - 0x40]
push str.CPythonPlayer::__UseSkill__d____The_screen_direction_settings_should_be_as_standard
call fcn.004f70a0
add esp, 8
mov eax, dword [ebp - 0x48]
push ecx
mov ecx, dword [ebp - 0x2c]
movss xmm0, dword [edi + eax*8 + 0x11980]
movss dword [esp], xmm0
call fcn.004d24d0
push dword [ebp - 0x2c]
mov ecx, edi
mov dword [ebp - 0x44], eax
call fcn.004c7430
cmp dword [ebp - 0x44], 0
mov dword [ebp - 0x34], eax
jbe 0x4c7f46
cmp dword [ebp - 0x30], 0
je 0x4c7f46
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 4], 0
call fcn.004d2680
test eax, eax
je 0x4c7de3
lea eax, [ebp - 0x54]
push eax
mov eax, dword [ebp - 0x34]
push dword [ebp - 0x30]
push ecx
movd xmm0, eax
mov ecx, esi
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x62d680]
cvtpd2ps xmm0, xmm0
movss dword [esp], xmm0
call fcn.004676a0
test al, al
je 0x4c7e9e
mov esi, dword [ebp - 0x54]
cmp esi, dword [ebp - 0x50]
je 0x4c7e9b
mov eax, 1
cmp eax, dword [ebp - 0x44]
jae 0x4c7ef3
mov eax, dword [esi]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x30], eax
je 0x4c7dd3
mov ecx, eax
call fcn.004620d0
test eax, eax
jne 0x4c7dd3
push dword [ebp - 0x34]
mov ecx, dword [ebp - 0x3c]
call fcn.004668d0
mov ecx, dword [ebp - 0x34]
call fcn.00461ab0
lea edx, [ebp - 0x28]
push edx
lea ecx, [eax + 0x1e0]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov ecx, dword [ebp - 0x34]
push eax
call fcn.00461cd0
mov ecx, dword [0x6a62c4]
push eax
call fcn.004b01b0
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
jmp 0x4c7dd6
mov eax, dword [ebp - 0x38]
add esi, 4
cmp esi, dword [ebp - 0x50]
jne 0x4c7d73
jmp 0x4c7e9b
mov ecx, dword [ebp - 0x2c]
call fcn.004d2670
test eax, eax
je 0x4c7e9e
lea eax, [ebp - 0x54]
push eax
mov eax, dword [ebp - 0x34]
push ecx
mov ecx, esi
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x62d680]
cvtpd2ps xmm0, xmm0
movss dword [esp], xmm0
call fcn.00467470
test al, al
je 0x4c7e9e
mov esi, dword [ebp - 0x54]
cmp esi, dword [ebp - 0x50]
je 0x4c7e9b
mov eax, 1
cmp eax, dword [ebp - 0x44]
jae 0x4c7ef3
mov eax, dword [esi]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x30], eax
je 0x4c7e90
mov ecx, eax
call fcn.004620d0
test eax, eax
jne 0x4c7e90
push dword [ebp - 0x34]
mov ecx, dword [ebp - 0x3c]
call fcn.004668d0
mov ecx, dword [ebp - 0x34]
call fcn.00461ab0
lea edx, [ebp - 0x28]
push edx
lea ecx, [eax + 0x1e0]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov ecx, dword [ebp - 0x34]
push eax
call fcn.00461cd0
mov ecx, dword [0x6a62c4]
push eax
call fcn.004b01b0
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
jmp 0x4c7e93
mov eax, dword [ebp - 0x38]
add esi, 4
cmp esi, dword [ebp - 0x50]
jne 0x4c7e30
mov esi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x44]
jae 0x4c7ef3
mov edi, dword [ebp - 0x44]
sub edi, eax
nop dword [eax + eax]
lea eax, [ebp - 0x1c]
mov ecx, esi
push eax
push dword [ebp - 0x30]
call fcn.00467940
movss xmm0, dword [ebp - 0x18]
lea eax, [ebp - 0x1c]
xorps xmm0, xmmword [0x62d690]
mov ecx, esi
push eax
movss dword [ebp - 0x18], xmm0
call fcn.00466960
mov ecx, dword [0x6a62c4]
lea eax, [ebp - 0x1c]
push eax
push 0
call fcn.004b01b0
sub edi, 1
jne 0x4c7eb0
mov edi, dword [ebp - 0x58]
mov edx, dword [ebp - 0x54]
mov dword [ebp - 4], 0xffffffff
test edx, edx
je 0x4c7f46
mov ecx, dword [ebp - 0x4c]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x4c7f27
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4c800d
push ecx
push edx
call fcn.0059df52
add esp, 8
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov ecx, edi
call fcn.004bd2e0
mov ecx, dword [ebp - 0x2c]
call fcn.00481d10
test eax, eax
jne 0x4c7fc9
mov esi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x2c]
push dword [edi + esi*8 + 0x11978]
call fcn.004d2350
mov edi, eax
mov eax, dword [ebp - 0x58]
push ecx
mov ecx, dword [ebp - 0x2c]
movss xmm0, dword [eax + esi*8 + 0x11980]
movss dword [esp], xmm0
call fcn.004d1e90
mov ecx, dword [ebp - 0x2c]
mov esi, eax
call fcn.004d26a0
test eax, eax
mov eax, dword [ebp - 0x48]
setne cl
movzx ecx, cl
push ecx
mov ecx, dword [ebp - 0x3c]
push esi
push edi
mov edi, dword [ebp - 0x58]
push dword [edi + eax*8 + 0x11970]
call fcn.00467cf0
test al, al
jne 0x4c7fc9
push dword [ebp - 0x40]
push str.CPythonPlayer::__UseSkill__d____pkInstMain__NEW_UseSkill___ERROR
call fcn.004f70a0
add esp, 8
xor al, al
jmp 0x4c7fe6
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x4c7fd7
call fcn.00461cd0
jmp 0x4c7fd9
xor eax, eax
push eax
push dword [ebp - 0x40]
mov ecx, edi
call fcn.004c7830
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059df60
mov esp, ebp
pop ebp
ret 4
push str.CANNOT_ATTACK
jmp 0x4c7b05
call fcn.005e5408
int3