Function at 0x1004c000
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov edx, dword [ebp + 0x18]
xor ecx, ecx
push ebx
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x158]
mov ebx, dword [edi + 0x150]
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0x154]
mov dword [ebp - 0x28], eax
mov eax, edx
add eax, dword [edi + 0x38]
mov dword [ebp - 0x1c], ebx
adc ecx, dword [edi + 0x3c]
cmp ecx, 0xf
ja 0x1004c28c
jb 0x1004c047
cmp eax, 0xffffffe0
ja 0x1004c28c
cmp dword [edi + 0x164], 0
mov dword [edi + 0x38], eax
lea eax, [edi + 0x40]
mov dword [edi + 0x3c], ecx
lea ecx, [edi + 0x50]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], eax
je 0x1004c076
push ecx
push eax
call ebx
mov edx, dword [ebp + 0x18]
add esp, 8
mov dword [edi + 0x164], 0
mov ecx, dword [edi + 0x160]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 4], ecx
push esi
mov esi, dword [ebp + 0x14]
test ecx, ecx
je 0x1004c0e0
nop word [eax + eax]
test edx, edx
je 0x1004c0ce
mov al, byte [ecx + edi + 0x10]
dec edx
xor al, byte [ebx]
inc ebx
mov byte [esi], al
inc esi
xor byte [ecx + edi + 0x40], al
inc ecx
and ecx, 0xf
mov dword [ebp - 8], ebx
mov dword [ebp + 0x18], edx
mov dword [ebp - 4], ecx
jne 0x1004c090
lea eax, [edi + 0x50]
push eax
lea eax, [edi + 0x40]
push eax
call dword [ebp - 0x1c]
mov eax, dword [ebp - 4]
add esp, 8
mov edx, dword [ebp + 0x18]
mov dword [ebp - 4], eax
mov dword [ebp + 0x18], edx
jmp 0x1004c0e3
pop esi
mov dword [edi + 0x160], ecx
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 8], ebx
mov eax, dword [edi + 0xc]
bswap eax
mov dword [ebp - 0xc], eax
cmp edx, 0xc00
jb 0x1004c19d
mov eax, 0xaaaaaaab
lea ecx, [edi + 0x10]
mul edx
mov dword [ebp - 0x1c], ecx
shr edx, 0xb
mov dword [ebp - 0x18], edx
nop word [eax + eax]
mov dword [ebp - 0x14], 0xc0
push dword [ebp + 0xc]
push ecx
push edi
call dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add esp, 0xc
inc eax
mov dword [ebp - 0xc], eax
bswap eax
mov dword [edi + 0xc], eax
mov edi, ebx
mov ebx, dword [ebp + 8]
xor eax, eax
sub edi, esi
nop word [eax + eax]
mov ecx, dword [ebx + eax + 0x10]
lea edx, [eax + esi]
xor ecx, dword [edi + edx]
add eax, 4
mov dword [edx], ecx
cmp eax, 0x10
jb 0x1004c140
mov ebx, dword [ebp - 8]
add esi, 0x10
mov ecx, dword [ebp - 0x1c]
add ebx, 0x10
sub dword [ebp - 0x14], 1
mov edi, dword [ebp + 8]
mov dword [ebp - 8], ebx
jne 0x1004c117
push 0xc00
lea eax, [esi - 0xc00]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call dword [ebp - 0x28]
mov edx, dword [ebp + 0x18]
add esp, 0x10
mov ecx, dword [ebp - 0x1c]
sub edx, 0xc00
sub dword [ebp - 0x18], 1
mov dword [ebp + 0x18], edx
jne 0x1004c110
mov ecx, edx
and ecx, 0xfffffff0
mov dword [ebp - 0x14], ecx
je 0x1004c227
cmp edx, 0x10
jb 0x1004c212
lea eax, [edi + 0x10]
shr edx, 4
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], edx
nop dword [eax]
push dword [ebp + 0xc]
push eax
push edi
call dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add esp, 0xc
inc eax
xor edx, edx
mov dword [ebp - 0xc], eax
bswap eax
mov dword [edi + 0xc], eax
mov edi, ebx
mov ebx, dword [ebp - 0x18]
sub edi, esi
mov eax, dword [ebx + edx]
lea ecx, [edx + esi]
xor eax, dword [edi + ecx]
add edx, 4
mov dword [ecx], eax
cmp edx, 0x10
jb 0x1004c1e0
mov ebx, dword [ebp - 8]
add esi, 0x10
mov edi, dword [ebp + 8]
add ebx, 0x10
sub dword [ebp + 0x18], 0x10
sub dword [ebp - 0x1c], 1
mov dword [ebp - 8], ebx
lea eax, [edi + 0x10]
jne 0x1004c1c0
mov ecx, dword [ebp - 0x14]
push ecx
mov eax, esi
sub eax, ecx
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x24]
call dword [ebp - 0x28]
mov edx, dword [ebp + 0x18]
add esp, 0x10
mov edi, dword [ebp + 8]
test edx, edx
je 0x1004c277
push dword [ebp + 0xc]
lea eax, [edi + 0x10]
push eax
push edi
call dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
lea ecx, [edi + 0x40]
inc eax
sub ebx, esi
bswap eax
mov dword [edi + 0xc], eax
add esp, 0xc
mov eax, dword [ebp - 4]
add ecx, eax
lea edx, [eax + esi]
mov esi, dword [ebp + 0x18]
add eax, esi
mov dword [ebp - 4], eax
nop word [eax + eax]
mov al, byte [edx + ebx]
lea edx, [edx + 1]
xor al, byte [ecx - 0x30]
lea ecx, [ecx + 1]
mov byte [edx - 1], al
xor byte [ecx - 1], al
sub esi, 1
jne 0x1004c260
mov eax, dword [ebp - 4]
pop esi
mov dword [edi + 0x160], eax
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret