Function at 0x4c487c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x737fce
mov eax, dword fs:[0]
push eax
sub esp, 0x140
mov eax, dword [0x820ac4]
xor eax, esp
mov dword [esp + 0x138], eax
push ebx
push esi
push edi
mov eax, dword [0x820ac4]
xor eax, esp
push eax
lea eax, [esp + 0x150]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x10]
xor edi, edi
cmp eax, edi
mov esi, ecx
mov dword [esp + 0x20], esi
jne 0x4c4c23
mov ecx, dword [esi]
add ecx, 0x60
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, edi
jne 0x4c4c23
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x4c4961
cmp dword [ebx + 4], edi
jne 0x4c492d
push 0x9c
call fcn.005416ba
pop ecx
mov dword [esp + 0x18], eax
cmp eax, edi
mov dword [esp + 0x158], edi
je 0x4c4920
push eax
call fcn.00461d13
jmp 0x4c4922
xor eax, eax
or dword [esp + 0x158], 0xffffffff
mov dword [ebx + 4], eax
mov edi, dword [ebx + 4]
call fcn.00461d9f
mov eax, dword [esi]
add eax, dword [esp + 0x1c]
mov ecx, dword [ebx + 4]
push eax
call fcn.004620fb
add dword [esi], 0x60
push ebx
call fcn.004c5469
push dword [ebx + 4]
call fcn.00462174
mov dword [ebx + 0x10], 1
jmp 0x4c4c23
cmp dword [ebx + 4], edi
jne 0x4c49a0
push 0x9c
call fcn.005416ba
pop ecx
mov dword [esp + 0x18], eax
cmp eax, edi
mov dword [esp + 0x158], 1
je 0x4c498c
push eax
call fcn.00461d13
jmp 0x4c498e
xor eax, eax
or dword [esp + 0x158], 0xffffffff
mov edi, eax
mov dword [ebx + 4], eax
call fcn.00461d9f
mov eax, dword [esi]
add eax, dword [esp + 0x1c]
mov ecx, dword [ebx + 4]
push eax
call fcn.004620fb
add dword [esi], 0x60
lea eax, [esp + 0xfc]
push eax
mov eax, dword [ebx]
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebx
call dword [eax + 0xc]
call fcn.0040d560
mov esi, eax
mov dword [esp + 0x158], 2
mov eax, dword [ebx + 4]
add eax, 0x3c
push eax
lea eax, [esp + 0x11c]
push str.keyB
push eax
call fcn.00424625
add esp, 0xc
push esi
push eax
lea eax, [esp + 0xb0]
push eax
mov byte [esp + 0x164], 3
call fcn.00424550
add esp, 0xc
push 0
push 1
lea ecx, [esp + 0x120]
call fcn.00407277
push 0
push 1
lea ecx, [esp + 0x104]
mov byte [esp + 0x160], 6
call fcn.00407277
cmp dword [esp + 0xc0], 0x10
mov esi, dword [esp + 0xac]
jae 0x4c4a4e
lea esi, [esp + 0xac]
mov edi, dword [esp + 0xbc]
lea eax, [esp + 0x94]
push 0
push eax
call fcn.00461034
cmp dword [ebx + 0xc], 0
pop ecx
pop ecx
jne 0x4c4a9a
push 8
call fcn.005416ba
pop ecx
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0x158], 7
je 0x4c4a8d
mov esi, eax
call fcn.00461c46
jmp 0x4c4a8f
xor eax, eax
mov byte [esp + 0x158], 6
mov dword [ebx + 0xc], eax
mov esi, dword [ebx + 0xc]
push 0x14
lea edx, [esp + 0x98]
call fcn.00461c84
sub esp, 0x1c
mov eax, esp
mov dword [esp + 0x34], esp
push eax
lea eax, [esp + 0xb4]
call fcn.0040d560
mov ecx, dword [ebx + 4]
call fcn.004622ab
lea eax, [esp + 0x5c]
push eax
mov eax, dword [ebx]
lea ecx, [esp + 0x138]
push ecx
mov ecx, ebx
call dword [eax + 0xc]
call fcn.0040d560
mov esi, eax
mov byte [esp + 0x158], 8
mov eax, dword [ebx + 4]
add eax, 0x3c
push eax
lea eax, [esp + 0xc8]
push str.keyA
push eax
call fcn.00424625
add esp, 0xc
push esi
push eax
lea eax, [esp + 0xe8]
push eax
mov byte [esp + 0x164], 9
call fcn.00424550
add esp, 0xc
push 0xffffffffffffffff
xor esi, esi
push esi
push eax
lea ecx, [esp + 0xb4]
mov byte [esp + 0x164], 0xa
call fcn.0040a0c9
push esi
push 1
lea ecx, [esp + 0xe8]
call fcn.00407277
push esi
push 1
lea ecx, [esp + 0xcc]
call fcn.00407277
push esi
push 1
lea ecx, [esp + 0x64]
mov byte [esp + 0x160], 6
call fcn.00407277
cmp dword [esp + 0xc0], 0x10
mov esi, dword [esp + 0xac]
jae 0x4c4b86
lea esi, [esp + 0xac]
mov edi, dword [esp + 0xbc]
lea eax, [esp + 0x134]
push 0
push eax
call fcn.00461034
cmp dword [ebx + 8], 0
pop ecx
pop ecx
push 5
pop ecx
mov esi, eax
lea edi, [esp + 0x94]
rep movsd dword es:[edi], dword [esi]
jne 0x4c4be0
push 8
call fcn.005416ba
pop ecx
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0x158], 0xb
je 0x4c4bd3
mov esi, eax
call fcn.00461c46
jmp 0x4c4bd5
xor eax, eax
mov byte [esp + 0x158], 6
mov dword [ebx + 8], eax
mov esi, dword [ebx + 8]
push 0x14
lea edx, [esp + 0x98]
call fcn.00461c84
mov ecx, ebx
call fcn.004c55ae
push dword [ebx + 4]
call fcn.00462174
or dword [esp + 0x158], 0xffffffff
push 0
push 1
lea ecx, [esp + 0xb0]
mov dword [ebx + 0x10], 6
call fcn.00407277
mov esi, dword [esp + 0x20]
mov eax, dword [ebx + 0x10]
cmp eax, 1
jne 0x4c4c9b
mov ecx, dword [esi]
add ecx, 0x14
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, eax
jne 0x4c4c9b
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
mov eax, dword [esi]
and dword [esp + 0x18], 0
lea ecx, [esp + 0x17]
push ecx
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [ebp + 0x10]
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x28]
add ecx, eax
push ecx
push dword [ebx + 4]
mov byte [esp + 0x2b], 0
call fcn.00462213
mov ecx, dword [esp + 0x18]
add dword [esi], ecx
test eax, eax
je 0x4c5443
cmp eax, 1
jne 0x4c4dc2
cmp byte [esp + 0x17], 0
mov dword [ebx + 0x10], 2
je 0x4c4c9b
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x18]
mov eax, dword [ebx + 0x10]
cmp eax, 2
jne 0x4c5018
mov ecx, dword [esi]
add ecx, 0x14
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, eax
jne 0x4c5018
mov eax, dword [esi]
add eax, dword [esp + 0x1c]
push 0x14
push eax
lea ecx, [esp + 0x120]
call fcn.0040deea
mov dword [esp + 0x158], 0xc
add dword [esi], 0x14
mov eax, dword [ebx + 4]
add eax, 0x3c
push eax
lea eax, [esp + 0x100]
push str.req3
push eax
call fcn.00424625
add esp, 0xc
mov byte [esp + 0x158], 0xd
cmp dword [esp + 0x114], 0x10
mov esi, dword [esp + 0x100]
jae 0x4c4d1c
lea esi, [esp + 0x100]
mov edi, dword [esp + 0x110]
lea eax, [esp + 0x134]
push 0
push eax
call fcn.00461034
pop ecx
pop ecx
xor esi, esi
push esi
lea ecx, [esp + 0x11c]
call fcn.0040757c
mov cl, byte [esp + esi + 0x134]
xor byte [eax], cl
inc esi
cmp esi, 0x14
jl 0x4c4d36
lea eax, [esp + 0x94]
push eax
call fcn.0040d1f5
cmp dword [esp + 0x130], 0x10
mov eax, dword [esp + 0x11c]
jae 0x4c4d77
lea eax, [esp + 0x11c]
push 0x14
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.0054d050
mov eax, dword [ebx]
add esp, 0xc
lea ecx, [esp + 0x94]
push ecx
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebx
call dword [eax + 0x10]
test al, al
jne 0x4c4dd7
push 0
push 1
lea ecx, [esp + 0x104]
mov dword [ebx + 0x10], 0xa
call fcn.00407277
lea ecx, [esp + 0x118]
jmp 0x4c543a
cmp eax, 2
jne 0x4c4c9b
mov dword [ebx + 0x10], 0xa
jmp 0x4c5443
lea eax, [esp + 0xe0]
push eax
lea eax, [esp + 0x98]
call fcn.0040d560
mov esi, eax
mov byte [esp + 0x158], 0xe
mov eax, dword [ebx + 4]
add eax, 0x3c
push eax
lea eax, [esp + 0x60]
push str.keyA
push eax
call fcn.00424625
add esp, 0xc
push esi
push eax
lea eax, [esp + 0xcc]
push eax
mov byte [esp + 0x164], 0xf
call fcn.00424550
add esp, 0xc
push 0
push 1
lea ecx, [esp + 0x64]
call fcn.00407277
push 0
push 1
lea ecx, [esp + 0xe8]
mov byte [esp + 0x160], 0x12
call fcn.00407277
cmp dword [esp + 0xdc], 0x10
mov esi, dword [esp + 0xc8]
jae 0x4c4e65
lea esi, [esp + 0xc8]
mov edi, dword [esp + 0xd8]
lea eax, [esp + 0xa8]
push 0
push eax
call fcn.00461034
cmp dword [ebx + 0xc], 0
pop ecx
pop ecx
jne 0x4c4eb1
push 8
call fcn.005416ba
pop ecx
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0x158], 0x13
je 0x4c4ea4
mov esi, eax
call fcn.00461c46
jmp 0x4c4ea6
xor eax, eax
mov byte [esp + 0x158], 0x12
mov dword [ebx + 0xc], eax
mov esi, dword [ebx + 0xc]
push 0x14
lea edx, [esp + 0xac]
call fcn.00461c84
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x98]
call fcn.0040d560
mov esi, eax
mov byte [esp + 0x158], 0x14
mov eax, dword [ebx + 4]
add eax, 0x3c
push eax
lea eax, [esp + 0x7c]
push str.keyB
push eax
call fcn.00424625
add esp, 0xc
push esi
push eax
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x164], 0x15
call fcn.00424550
add esp, 0xc
push 0xffffffffffffffff
xor esi, esi
push esi
push eax
lea ecx, [esp + 0xd0]
mov byte [esp + 0x164], 0x16
call fcn.0040a0c9
push esi
push 1
lea ecx, [esp + 0x2c]
call fcn.00407277
push esi
push 1
lea ecx, [esp + 0x80]
call fcn.00407277
push esi
push 1
lea ecx, [esp + 0x48]
mov byte [esp + 0x160], 0x12
call fcn.00407277
cmp dword [esp + 0xdc], 0x10
mov esi, dword [esp + 0xc8]
jae 0x4c4f6e
lea esi, [esp + 0xc8]
mov edi, dword [esp + 0xd8]
lea eax, [esp + 0x24]
push 0
push eax
call fcn.00461034
cmp dword [ebx + 8], 0
pop ecx
pop ecx
push 5
pop ecx
mov esi, eax
lea edi, [esp + 0xa8]
rep movsd dword es:[edi], dword [esi]
jne 0x4c4fc5
push 8
call fcn.005416ba
pop ecx
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0x158], 0x17
je 0x4c4fb8
mov esi, eax
call fcn.00461c46
jmp 0x4c4fba
xor eax, eax
mov byte [esp + 0x158], 0x12
mov dword [ebx + 8], eax
mov esi, dword [ebx + 8]
push 0x14
lea edx, [esp + 0xac]
call fcn.00461c84
xor esi, esi
push esi
push 1
lea ecx, [esp + 0xcc]
mov dword [ebx + 0x10], 3
call fcn.00407277
push esi
push 1
lea ecx, [esp + 0x104]
call fcn.00407277
or dword [esp + 0x158], 0xffffffff
push esi
push 1
lea ecx, [esp + 0x120]
call fcn.00407277
mov esi, dword [esp + 0x20]
mov eax, dword [ebx + 0x10]
cmp eax, 3
jne 0x4c514f
mov ecx, dword [esi]
add ecx, 0xe
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, eax
jne 0x4c514f
mov eax, dword [esi]
mov ecx, dword [esp + 0x1c]
push dword [esp + 0x18]
add eax, ecx
lea ecx, [eax + 0xe]
push ecx
push eax
lea eax, [esp + 0xa0]
push eax
call fcn.004c5c42
mov dword [esp + 0x158], 0x18
add dword [esi], 0xe
xor eax, eax
cmp dword [esp + 0x98], eax
je 0x4c507f
mov eax, dword [esp + 0x9c]
sub eax, dword [esp + 0x98]
push eax
xor edi, edi
push edi
lea esi, [esp + 0x9c]
call fcn.004145df
push eax
mov eax, dword [ebx + 0xc]
call fcn.00461cee
push 8
call fcn.004145df
push eax
push edi
call fcn.004145df
push eax
lea esi, [esp + 0x48]
call fcn.0044be23
push 0x8b6154
mov ecx, eax
mov byte [esp + 0x15c], 0x19
call fcn.00424780
push edi
test eax, eax
push 1
mov ecx, esi
setne byte [esp + 0x1f]
mov byte [esp + 0x160], 0x18
call fcn.00407277
cmp byte [esp + 0x17], 0
lea esi, [esp + 0x94]
je 0x4c50fc
mov dword [ebx + 0x10], 0xa
call fcn.0040ad21
jmp 0x4c5443
push 8
call fcn.004145df
mov ecx, eax
call fcn.0044eb63
test al, 2
lea esi, [esp + 0x94]
je 0x4c50eb
push 0xc
call fcn.004145df
movzx cx, byte [eax + 1]
movzx ax, byte [eax]
shl ax, 8
add cx, ax
cmp cx, 0x200
mov word [ebx + 0x18], cx
ja 0x4c50eb
or dword [esp + 0x158], 0xffffffff
mov dword [ebx + 0x10], 4
call fcn.0040ad21
mov esi, dword [esp + 0x20]
mov eax, dword [ebx + 0x10]
cmp eax, 4
jne 0x4c5215
movzx ecx, word [ebx + 0x18]
mov edx, dword [esi]
lea ecx, [ecx + edx + 2]
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, eax
jne 0x4c5215
movzx ecx, word [ebx + 0x18]
push dword [esp + 0x18]
mov eax, edx
mov edx, dword [esp + 0x20]
add ecx, edx
lea ecx, [ecx + eax + 2]
add eax, edx
push ecx
push eax
lea eax, [esp + 0xa0]
push eax
call fcn.004c5c42
mov dword [esp + 0x158], 0x1a
movzx eax, word [ebx + 0x18]
inc eax
inc eax
add dword [esi], eax
xor eax, eax
cmp dword [esp + 0x98], eax
je 0x4c51c7
mov eax, dword [esp + 0x9c]
sub eax, dword [esp + 0x98]
push eax
push 0
lea esi, [esp + 0x9c]
call fcn.004145df
push eax
mov eax, dword [ebx + 0xc]
call fcn.00461cee
movzx eax, word [ebx + 0x18]
push eax
call fcn.004145df
movzx cx, byte [eax]
movzx ax, byte [eax + 1]
or dword [esp + 0x158], 0xffffffff
shl cx, 8
add cx, ax
mov word [ebx + 0x1c], cx
mov dword [ebx + 0x10], 5
call fcn.0040ad21
mov esi, dword [esp + 0x20]
mov eax, dword [ebx + 0x10]
cmp eax, 5
jne 0x4c5249
movzx ecx, word [ebx + 0x1c]
add ecx, dword [esi]
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, eax
jne 0x4c5249
mov esi, dword [ebx + 4]
mov dword [ebx + 0x10], 9
call fcn.004623fb
push ebx
call fcn.004c59c7
mov esi, dword [esp + 0x20]
mov eax, dword [ebx + 0x10]
cmp eax, 6
jne 0x4c52d0
mov ecx, dword [esi]
add ecx, 8
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, eax
jne 0x4c52d0
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
mov ecx, dword [esi]
mov edi, dword [esp + 0x1c]
mov edx, dword [ebx + 4]
and dword [esp + 0x18], 0
lea eax, [esp + 0x17]
push eax
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebp + 0x10]
sub eax, ecx
add ecx, edi
push ecx
call fcn.00462352
mov ecx, dword [esp + 0x18]
add dword [esi], ecx
test eax, eax
mov ecx, dword [esi]
je 0x4c5443
cmp eax, 1
jne 0x4c52c6
push dword [0x8b6168]
lea eax, [edi + ecx]
push eax
mov eax, dword [ebx + 0xc]
call fcn.00461cee
mov eax, dword [0x8b6168]
add dword [esi], eax
mov dword [ebx + 0x10], 7
jmp 0x4c52d4
cmp eax, 2
jne 0x4c52d4
jmp 0x4c4dcb
mov edi, dword [esp + 0x1c]
mov eax, dword [ebx + 0x10]
cmp eax, 7
jne 0x4c53a6
mov ecx, dword [esi]
add ecx, 6
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, eax
jne 0x4c53a6
mov eax, dword [esi]
push dword [esp + 0x18]
add eax, edi
lea ecx, [eax + 6]
push ecx
push eax
lea eax, [esp + 0xa0]
push eax
call fcn.004c5c42
mov dword [esp + 0x158], 0x1b
add dword [esi], 6
cmp dword [esp + 0x98], 0
jne 0x4c532c
xor eax, eax
jmp 0x4c533a
mov eax, dword [esp + 0x9c]
sub eax, dword [esp + 0x98]
push eax
push 0
lea esi, [esp + 0x9c]
call fcn.004145df
push eax
mov eax, dword [ebx + 0xc]
call fcn.00461cee
push 0
call fcn.004145df
mov ecx, eax
call fcn.0044eb63
test al, 2
je 0x4c50eb
push 4
call fcn.004145df
movzx cx, byte [eax + 1]
movzx ax, byte [eax]
shl ax, 8
add cx, ax
cmp cx, 0x200
mov word [ebx + 0x1a], cx
ja 0x4c50eb
or dword [esp + 0x158], 0xffffffff
mov dword [ebx + 0x10], 8
call fcn.0040ad21
mov esi, dword [esp + 0x20]
mov eax, dword [ebx + 0x10]
cmp eax, 8
jne 0x4c5443
movzx ecx, word [ebx + 0x1a]
add ecx, dword [esi]
cmp dword [ebp + 0x10], ecx
jb 0x4c5443
cmp eax, eax
jne 0x4c5443
movzx eax, word [ebx + 0x1a]
push eax
mov eax, dword [esi]
add eax, dword [esp + 0x20]
lea ecx, [esp + 0xe4]
push eax
call fcn.0040deea
mov dword [esp + 0x158], 0x1c
movzx eax, word [ebx + 0x1a]
add dword [esi], eax
cmp dword [esp + 0xf8], 0x10
mov eax, dword [esp + 0xe4]
jae 0x4c5406
lea eax, [esp + 0xe4]
push dword [esp + 0xf4]
push eax
mov eax, dword [ebx + 0xc]
call fcn.00461cee
mov esi, dword [ebx + 4]
mov dword [ebx + 0x10], 9
call fcn.004623fb
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov dword [ebx + 0x14], 3
lea ecx, [esp + 0xe0]
push 0
push 1
call fcn.00407277
mov ecx, dword [esp + 0x150]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.0054ae61
mov esp, ebp
pop ebp
ret 0xc