Function at 0x100041b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 0x14]
sub esp, 0x2c
push ebp
mov ebp, dword [eax + 4]
test ebp, ebp
jns 0x100041e7
cmp dword [eax], 0
jg 0x100041e7
push dword [esp + 0x38]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
add eax, ecx
push eax
push ecx
call fcn.10002bb0
mov eax, dword [esp + 0x40]
add esp, 0xc
mov dword [eax], edx
pop ebp
add esp, 0x2c
ret
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x28]
mov ecx, dword [esp + 0x40]
push ebx
push esi
push edi
add ecx, eax
mov dword [esp + 0x28], eax
push edx
push ecx
push eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
call fcn.1000eba0
mov edx, dword [esp + 0x34]
add esp, 0xc
xor ebx, ebx
mov dword [esp + 0x30], eax
mov byte [esp + 0x38], 0
cmp edx, dword [esp + 0x2c]
je 0x100042e9
mov esi, ebx
mov dword [esp + 0x14], esi
cmp ebx, ebp
jne 0x1000424a
test ebp, ebp
jns 0x100042e9
mov edi, dword [esp + 0x34]
cmp edi, 0x25fd
jae 0x10004279
mov eax, 1
mov ecx, 0x1004f0d8
cmp edi, dword [ecx]
jb 0x100042b5
add ecx, 4
xor eax, 3
cmp ecx, 0x1004f400
jne 0x10004260
mov eax, 1
jmp 0x100042b5
mov eax, 0x1004f0d8
mov edx, 0xca
mov esi, edx
shr esi, 1
cmp edi, dword [eax + esi*4]
lea ecx, [eax + esi*4]
jae 0x10004293
mov edx, esi
jmp 0x1000429d
lea eax, [ecx + 4]
or ecx, 0xffffffff
sub ecx, esi
add edx, ecx
test edx, edx
jg 0x10004283
mov edx, dword [esp + 0x28]
sub eax, 0x1004f0d8
mov esi, dword [esp + 0x14]
sar eax, 2
and eax, 1
inc eax
mov ecx, bind
sub ecx, eax
cmp ecx, ebx
jl 0x100043b9
add ebx, eax
cmp ebx, ebp
jle 0x100042d2
test ebp, ebp
jns 0x100043b2
lea ecx, [esp + 0x28]
call fcn.1000dd90
mov edx, dword [esp + 0x28]
cmp edx, dword [esp + 0x2c]
jne 0x10004238
mov dword [esp + 0x10], edx
mov ebp, dword [esp + 0x50]
xor edi, edi
mov eax, dword [esp + 0x48]
xor esi, esi
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x20], eax
mov al, byte [ebp + 9]
mov ebp, dword [ebp]
test al, al
movzx edx, al
mov dword [esp + 0x14], 1
cmove edx, dword [esp + 0x14]
cmp ebx, ebp
jge 0x10004348
movzx eax, dl
sub eax, 1
je 0x100043d4
sub eax, 1
je 0x100043cb
sub eax, 1
jne 0x10004348
mov eax, ebp
mov esi, ebp
sub eax, ebx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
sub esi, edi
sub esi, ebx
mov edx, dword [esp + 0x50]
movzx ebp, byte [edx + 0xe]
lea ebx, [edx + 0xf]
mov dword [esp + 0x50], ebp
test edi, edi
jle 0x10004376
add ebp, ebx
nop dword [eax]
push ecx
push ebp
push ebx
call fcn.10002bb0
dec edi
add esp, 0xc
mov ecx, edx
test edi, edi
jg 0x10004360
mov ebp, dword [esp + 0x50]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
sub edx, eax
push ecx
add edx, eax
push edx
push eax
call fcn.10002bb0
add esp, 0xc
test esi, esi
jle 0x100043a4
lea edi, [ebx + ebp]
push edx
push edi
push ebx
call fcn.10002bb0
dec esi
add esp, 0xc
test esi, esi
jg 0x10004394
mov eax, dword [esp + 0x40]
pop edi
pop esi
pop ebx
mov dword [eax], edx
pop ebp
add esp, 0x2c
ret
mov ebx, esi
jmp 0x100042e9
test ebp, ebp
jns 0x100042e9
mov ebx, bind
jmp 0x100042ed
mov edi, ebp
sub edi, ebx
jmp 0x10004348
mov eax, dword [esp + 0x50]
mov esi, ebp
sub esi, ebx
movzx ebp, byte [eax + 0xe]
lea ebx, [eax + 0xf]
jmp 0x10004376