Function at 0x524630
Capabilities:
Encrypt data using rc4 prga
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x108
mov ebx, dword [ebp + 0xc]
mov edi, edx
mov esi, ecx
lea eax, [esp + 0x98]
push 0
push 0
push 0
push 0xa
push ebx
push dword [ebp + 8]
push edx
push ecx
push eax
call fcn.00532310
mov eax, edi
mov edx, esi
mov edi, ebx
add esp, 0x24
cmp esi, 0xa
mov ebx, eax
mov dword [esp + 0x18], 0
sbb eax, 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [ebp + 8]
sbb eax, 0
mov eax, edi
sbb eax, 0
jb 0x52476f
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa0]
or ecx, dword [esp + 0x98]
or eax, dword [esp + 0x9c]
or eax, ecx
jne 0x52476f
mov dword [esp + 0x14], 0
nop dword [eax]
mov eax, edi
mov dword [esp + 0x10], edi
mov edi, dword [esp]
mov dword [esp + 0xc], edx
push 0
push 0
push 0
push 0xa
push eax
push edi
push ebx
push edx
lea eax, [esp + 0xa8]
push eax
call fcn.00532cf0
add esp, 0x24
mov esi, dword [esp + 0x8c]
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x90]
mov eax, dword [esp + 0x88]
inc dword [esp + 0x14]
push 0
push 0
push 0
push 0xa
mov dword [esp + 0x18], ecx
push ecx
mov dword [esp + 0x14], edx
push edx
mov dword [esp + 0x1c], esi
push esi
mov esi, eax
push eax
lea eax, [esp + 0x98]
push eax
call fcn.00532310
add esp, 0x24
cmp dword [esp + 0xc], 0x64
sbb ebx, 0
sbb edi, 0
sbb dword [esp + 0x10], 0
jb 0x524785
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x80]
mov edi, dword [esp + 8]
mov ebx, dword [esp + 4]
mov edx, esi
or ecx, dword [esp + 0x78]
or eax, dword [esp + 0x7c]
or eax, ecx
je 0x5246c0
jmp 0x524777
mov dword [esp + 0x14], 0
mov ecx, dword [ebp + 0x18]
cmp dword [ecx + 0x10], 1
je 0x52479c
jmp 0x5249af
mov edi, dword [esp + 8]
mov ebx, dword [esp + 4]
mov edx, esi
mov ecx, dword [ebp + 0x18]
cmp dword [ecx + 0x10], 1
jne 0x5249af
mov eax, dword [ecx + 0x14]
cmp edx, 0xa
mov dword [esp + 8], edi
mov ecx, 0
mov dword [esp + 0x10], edx
mov dword [esp + 4], ebx
mov dword [esp + 0x20], eax
mov eax, ebx
sbb eax, 0
mov eax, dword [esp]
sbb eax, 0
sbb edi, 0
jb 0x524839
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 4]
mov eax, dword [esp]
mov ebx, dword [esp + 8]
xor ecx, ecx
nop dword [eax + eax]
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], ecx
push 0
push 0
push 0
push 0xa
push ebx
push eax
push edi
push esi
lea eax, [esp + 0x88]
push eax
call fcn.00532cf0
mov ecx, dword [esp + 0x30]
add esp, 0x24
mov eax, 0x63
inc ecx
cmp eax, esi
mov eax, 0
mov esi, dword [esp + 0x68]
sbb eax, edi
mov eax, 0
mov edi, dword [esp + 0x6c]
sbb eax, dword [esp + 0x18]
mov eax, 0
sbb eax, ebx
mov ebx, dword [esp + 0x74]
mov eax, dword [esp + 0x70]
jb 0x5247e0
mov esi, dword [esp + 0x20]
mov edx, 0
mov ebx, ecx
mov eax, esi
sub eax, ecx
cmovb eax, edx
sub ebx, esi
cmovb ebx, edx
mov dword [esp + 0x18], eax
cmp ebx, 2
jb 0x5248cd
add ebx, dword [esp + 0x14]
cmp ecx, esi
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 8]
mov eax, dword [esp]
cmovb esi, ecx
not esi
add esi, ecx
mov ecx, dword [esp + 4]
nop dword [eax]
push 0
push 0
push 0
push 0xa
push edi
push eax
push ecx
push edx
lea eax, [esp + 0x78]
push eax
call fcn.00532cf0
add esp, 0x24
mov edi, dword [esp + 0x64]
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
dec esi
jne 0x524880
mov dword [esp + 4], ecx
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0xc]
dec ebx
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 4]
cmp ecx, esi
mov dword [esp], eax
ja 0x5248e7
jmp 0x5249ac
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 8]
mov eax, dword [esp]
mov ebx, dword [esp + 4]
cmp ecx, esi
mov dword [esp], eax
jbe 0x5249ac
lea eax, [esp + 0x48]
push 0
push 0
push 0
push 0xa
mov dword [esp + 0x18], edi
push edi
push dword [esp + 0x14]
push ebx
push edx
push eax
mov dword [esp + 0x34], edx
call fcn.00532cf0
add esp, 0x24
mov eax, dword [esp + 0x50]
mov esi, 0xa
mov ecx, ebx
mov dword [esp + 0xc], eax
mul esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edx
mov eax, dword [esp + 0x48]
mov dword [esp + 0x20], eax
mul esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], edx
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x34], eax
mul esi
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x54]
lea edi, [ebx + ebx*4]
add edi, edi
add eax, dword [esp + 0x24]
adc edx, dword [esp + 0x2c]
adc edi, dword [esp + 0x30]
sub esi, dword [esp + 0x28]
sbb ecx, eax
mov eax, dword [esp]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 8]
sbb eax, edx
mov edx, 4
sbb ecx, edi
inc dword [esp + 0x14]
xor edi, edi
cmp edx, esi
mov edx, 0
mov esi, dword [esp + 0x34]
sbb edx, dword [esp + 4]
mov edx, 0
sbb edx, eax
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0xc]
sbb edi, ecx
adc edx, 0
adc esi, 0
adc eax, 0
adc ebx, 0
mov dword [esp], eax
mov edi, ebx
mov ebx, esi
mov ecx, dword [ebp + 0x18]
cmp edx, 0x64
mov eax, ebx
mov dword [esp + 4], ebx
sbb eax, 0
mov eax, dword [esp]
sbb eax, 0
mov eax, edi
sbb eax, 0
jb 0x524a80
mov ecx, dword [esp]
mov eax, dword [esp + 4]
xor esi, esi
nop word cs:[eax + eax]
nop
mov dword [esp + 4], eax
mov dword [esp], ecx
mov ebx, edx
push 0
push 0
push 0
push 0x64
push edi
push ecx
push eax
push edx
lea edx, [esp + 0x58]
push edx
call fcn.00532cf0
add esp, 0x24
mov eax, dword [esp + 0x38]
mov ecx, ebx
mov dword [esp + 0x10], eax
imul eax, eax, 0x64
sub ecx, eax
mov eax, dword [esp + 0x44]
movzx edx, word [ecx + ecx + 0xa5ed4a]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x3c]
mov word [esp + esi + 0x102], dx
mov edx, 0x270f
add esi, 0xfffffffe
mov ecx, dword [esp + 0xc]
cmp edx, ebx
mov edx, 0
sbb edx, dword [esp + 4]
mov edx, 0
sbb edx, dword [esp]
mov edx, 0
sbb edx, edi
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 8]
jb 0x5249e0
mov edi, dword [esp + 0x14]
mov ecx, dword [ebp + 0x18]
mov ebx, edx
mov eax, edi
sub eax, esi
add esi, 0x28
cmp ebx, 9
ja 0x524a92
jmp 0x524ab9
mov edi, dword [esp + 0x14]
mov esi, 0x28
mov ebx, edx
mov eax, edi
cmp ebx, 9
jbe 0x524ab9
mov dword [esp], eax
mov eax, edx
movzx edx, al
imul ebx, edx, 0xcd
shr ebx, 0xb
lea edx, [ebx + ebx]
lea edx, [edx + edx*4]
sub al, dl
or al, 0x30
mov byte [esp + esi + 0xdb], al
mov eax, dword [esp]
dec esi
inc eax
movzx edx, byte [ebp + 0x14]
cmp eax, edi
jne 0x524ac8
cmp dword [esp + 0x18], 0
je 0x524ad1
mov byte [esp + esi + 0xdb], 0x2e
dec esi
xor dl, 1
lea edi, [esp + 0xdc]
add bl, 0x30
shl dl, 5
mov byte [esi + edi - 1], bl
mov ebx, 0x29
lea edi, [esi + edi - 1]
or dl, 0x45
sub ebx, esi
cmp eax, 0xa
mov byte [esp + 0x1d], dl
movzx edx, byte [ebp + 0x10]
jae 0x524b0d
add al, 0x30
mov byte [esp + 0x1e], al
mov eax, 2
jmp 0x524b1f
movzx eax, word [eax + eax + 0xa5ed4a]
mov word [esp + 0x1e], ax
mov eax, 3
mov esi, dword [esp + 0x18]
mov word [esp + 0xb8], 2
mov dword [esp + 0xbc], edi
test dl, dl
lea edi, [esp + 0x1d]
mov dword [esp + 0xc0], ebx
mov word [esp + 0xc4], 0
mov dword [esp + 0xc8], esi
mov word [esp + 0xd0], 2
mov dword [esp + 0xd4], edi
mov dword [esp + 0xd8], eax
je 0x524b81
mov eax, dword [ecx + 0x18]
mov edx, 0xa5cbc8
mov esi, 0xa5e309
and eax, 1
cmove esi, edx
jmp 0x524b8b
mov eax, 1
mov esi, 0xa5e308
mov dword [esp + 0xa8], esi
mov dword [esp + 0xac], eax
lea eax, [esp + 0xb8]
lea edx, [esp + 0xa8]
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], 3
call fcn.00515e30
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret