Function at 0x44d210
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd0
mov eax, dword [0x51a230]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0xd0], eax
mov eax, dword [ebx]
mov dword [ebp - 0xc4], ebx
mov dword [eax + 8], 0
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x94], eax
cmp eax, 4
ja 0x44dc04
push edi
push ebx
call fcn.004513d0
mov edi, dword [ebx]
add esp, 4
test eax, eax
jne 0x44d292
push eax
push dword [edi + 8]
push ebx
call fcn.004517f0
add esp, 0xc
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00490604
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x94]
mov edx, dword [edi + 8]
mov dword [ebp - 0xac], edx
test eax, eax
jne 0x44d2b8
cmp edx, 3
setge al
lea eax, [eax*2 + 1]
mov dword [ebp - 0x94], eax
cmp edx, 3
jne 0x44d2e4
cmp dword [ebx + 0x47ec], edx
je 0x44d2d7
cmp dword [ebx + 0x47e8], 0
jne 0x44d2e4
cmp dword [ebx + 0x47e4], 0
jne 0x44d2e4
mov ecx, 1
mov dword [ebp - 0xb8], ecx
jmp 0x44d2f1
xor ecx, ecx
mov dword [ebp - 0xb8], ecx
cmp edx, 3
jne 0x44d305
cmp eax, 3
jge 0x44d305
test ecx, ecx
jne 0x44d305
mov edx, 1
mov dword [ebp - 0xac], edx
mov dword [ebp - 0x88], 0
xorps xmm0, xmm0
mov ecx, edi
push esi
movups xmmword [ebp - 0xa4], xmm0
test edx, edx
jle 0x44d41f
lea esi, [ebx + 0x46a0]
lea edi, [ebp - 0x78]
mov dword [ebp - 0x8c], esi
mov eax, dword [ebx]
mov eax, dword [eax]
add eax, 3
push eax
call fcn.004c1cc2
add esp, 4
mov dword [esi + 0x34], eax
test eax, eax
je 0x44d4b3
mov eax, dword [ebx + 0x4684]
cdq
idiv dword [esi]
mov ecx, dword [ebp - 0x8c]
mov esi, eax
mov dword [edi + 0x10], 0
mov eax, dword [ebx + 0x4688]
cdq
idiv dword [ecx + 4]
xor edx, edx
mov dword [edi], esi
mov ecx, eax
mov dword [ebp - 0x90], eax
sar ecx, 1
mov dword [edi + 4], eax
mov dword [edi + 0xc], ecx
mov ecx, dword [ebx]
mov eax, dword [ecx]
dec eax
add eax, esi
div esi
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x8c]
mov eax, dword [eax + 0x28]
mov dword [edi - 4], eax
mov dword [edi - 8], eax
mov eax, dword [ebp - 0x90]
cmp esi, 1
jne 0x44d3c6
cmp eax, esi
jne 0x44d3b5
mov eax, 0x44de40
jmp 0x44d3ed
mov esi, 1
cmp eax, 2
jne 0x44d3d7
mov eax, 0x45acb0
jmp 0x44d3ed
cmp esi, 2
jne 0x44d3e8
cmp eax, 1
jne 0x44d3d7
mov eax, 0x45a9a0
jmp 0x44d3ed
cmp esi, 2
jne 0x44d3e8
cmp eax, esi
jne 0x44d3e8
mov eax, dword [ebx + 0x4814]
jmp 0x44d3ed
mov eax, 0x45a960
mov esi, dword [ebp - 0x8c]
mov dword [edi - 0xc], eax
add esi, 0x48
mov eax, dword [ebp - 0x88]
add edi, 0x20
inc eax
mov dword [ebp - 0x8c], esi
mov dword [ebp - 0x88], eax
cmp eax, dword [ebp - 0xac]
jl 0x44d333
mov edi, dword [ebx]
mov ecx, edi
mov eax, dword [edi + 4]
mov edx, ecx
mov esi, dword [ebp - 0x94]
mov edi, dword [edi]
mov dword [ebp - 0x90], eax
test esi, esi
js 0x44d4c2
test edi, edi
js 0x44d4c2
je 0x44d456
mov eax, SysReAllocString
cdq
idiv edi
cmp esi, eax
jg 0x44d4c4
mov eax, dword [ebp - 0x90]
mov edx, edi
mov dword [ebp - 0x88], ecx
imul edx, esi
mov dword [ebp - 0xb4], edx
test edx, edx
js 0x44d4bc
mov edx, ecx
test eax, eax
js 0x44d4c2
je 0x44d48d
mov eax, SysReAllocString
cdq
idiv dword [ebp - 0x90]
cmp dword [ebp - 0xb4], eax
jg 0x44d4c4
mov eax, dword [ebp - 0x90]
imul edi, eax
imul edi, esi
cmp edi, 0x7ffffffe
jg 0x44d4c4
lea eax, [edi + 1]
push eax
call fcn.004c1cc2
mov ecx, dword [ebx]
add esp, 4
mov esi, eax
mov dword [ebp - 0x90], eax
jmp 0x44d4cc
mov eax, dword [ebx]
push 0
push dword [eax + 8]
jmp 0x44d4d4
mov edx, dword [ebp - 0x88]
mov ecx, edx
xor esi, esi
mov dword [ebp - 0x90], esi
test esi, esi
jne 0x44d509
push esi
push dword [ecx + 8]
push ebx
call fcn.004517f0
mov ecx, dword [0x51d614]
add esp, 0xc
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
pop edi
pop ebx
mov dword [eax + 0xc], str.outofmem
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00490604
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebp - 0xb4], eax
cmp dword [ecx + 4], eax
jbe 0x44dbac
mov edi, dword [ebp - 0xa4]
mov esi, dword [ecx]
mov edx, dword [ebp - 0x94]
imul esi, eax
mov dword [ebp - 0x88], 0
imul esi, edx
add esi, dword [ebp - 0x90]
cmp dword [ebp - 0xac], 0
mov dword [ebp - 0xb0], esi
jle 0x44d5f4
mov esi, dword [ebp - 0xac]
lea eax, [ebx + 0x46bc]
mov dword [ebp - 0x8c], eax
lea edi, [ebp - 0x6c]
mov ebx, eax
mov eax, dword [edi - 8]
sar eax, 1
cmp dword [edi], eax
jl 0x44d576
mov edx, dword [edi - 0x14]
jmp 0x44d579
mov edx, dword [edi - 0x10]
jl 0x44d580
mov eax, dword [edi - 0x10]
jmp 0x44d583
mov eax, dword [edi - 0x14]
push dword [edi - 0xc]
push dword [edi - 4]
push edx
push eax
push dword [ebx + 0x18]
call dword [edi - 0x18]
mov edx, dword [ebp - 0x88]
add esp, 0x14
mov dword [ebp + edx*4 - 0xa4], eax
mov eax, dword [edi]
inc eax
mov dword [edi], eax
cmp eax, dword [edi - 8]
jl 0x44d5c9
inc dword [edi + 4]
mov eax, dword [edi + 4]
mov ecx, dword [edi - 0x10]
mov dword [edi], 0
mov dword [edi - 0x14], ecx
cmp eax, dword [ebx]
jge 0x44d5c9
mov eax, dword [ebx + 4]
add eax, ecx
mov dword [edi - 0x10], eax
inc edx
add edi, 0x20
add ebx, 0x48
mov dword [ebp - 0x88], edx
cmp edx, esi
jl 0x44d568
mov ebx, dword [ebp - 0xc4]
mov esi, dword [ebp - 0xb0]
mov edi, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x94]
mov ecx, dword [ebx]
cmp edx, 3
jl 0x44d8c8
mov eax, dword [ecx + 8]
cmp eax, 3
jne 0x44d6b1
cmp dword [ebp - 0xb8], 0
je 0x44d68e
cmp dword [ecx], 0
mov dword [ebp - 0xb0], 0
jbe 0x44d8c1
mov ecx, dword [ebp - 0xa0]
mov eax, edi
mov edi, dword [ebp - 0x9c]
sub eax, ecx
add esi, 2
mov dword [ebp - 0x8c], eax
sub edi, ecx
mov dword [ebp - 0x88], edi
mov edi, dword [ebp - 0xb0]
movzx eax, byte [eax + ecx]
lea ecx, [ecx + 1]
mov byte [esi - 2], al
inc edi
movzx eax, byte [ecx - 1]
mov byte [esi - 1], al
mov eax, dword [ebp - 0x88]
movzx eax, byte [eax + ecx - 1]
mov byte [esi], al
mov byte [esi + 1], 0xff
add esi, edx
mov eax, dword [ebx]
cmp edi, dword [eax]
mov eax, dword [ebp - 0x8c]
jb 0x44d650
mov edi, dword [ebp - 0xa4]
mov ecx, dword [ebx]
jmp 0x44db90
mov eax, dword [ebx + 0x4810]
push edx
push dword [ecx]
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
push edi
push esi
call eax
mov ecx, dword [ebx]
add esp, 0x18
jmp 0x44db90
cmp eax, 4
jne 0x44d89e
mov eax, dword [ebx + 0x47e8]
test eax, eax
jne 0x44d7bc
mov dword [ebp - 0x88], eax
cmp dword [ecx], eax
jbe 0x44d8c1
mov edx, dword [ebp - 0xa0]
add esi, 2
mov dword [ebp - 0xb0], esi
mov eax, edi
mov esi, dword [ebp - 0x98]
mov ecx, esi
mov edi, dword [ebp - 0xb0]
sub edx, esi
mov dword [ebp - 0xbc], edx
sub eax, esi
mov edx, dword [ebp - 0x9c]
sub edx, esi
mov dword [ebp - 0x8c], esi
mov esi, dword [ebp - 0x94]
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xc0], edx
nop
movzx edx, byte [ecx]
movzx ecx, byte [eax + ecx]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xbc]
shr eax, 8
mov byte [edi - 2], al
mov eax, dword [ebp - 0x8c]
movzx ecx, byte [ecx + eax]
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xc0]
shr eax, 8
mov byte [edi - 1], al
mov eax, dword [ebp - 0x8c]
movzx ecx, byte [ecx + eax]
imul ecx, edx
mov edx, dword [ebp - 0x88]
mov byte [edi + 1], 0xff
inc edx
mov dword [ebp - 0x88], edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x8c]
shr eax, 8
inc ecx
mov byte [edi], al
add edi, esi
mov eax, dword [ebx]
mov dword [ebp - 0x8c], ecx
cmp edx, dword [eax]
mov eax, dword [ebp - 0xa8]
jb 0x44d720
mov edi, dword [ebp - 0xa4]
mov ecx, dword [ebx]
jmp 0x44db90
mov ecx, dword [ecx]
mov edi, dword [ebx + 0x4810]
mov dword [ebp - 0x88], edi
mov edi, dword [ebp - 0xa4]
push edx
push ecx
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
push edi
push esi
cmp eax, 2
jne 0x44d88e
call dword [ebp - 0x88]
mov eax, dword [ebx]
xor ecx, ecx
add esp, 0x18
mov dword [ebp - 0x88], ecx
cmp dword [eax], ecx
jbe 0x44d8c1
mov edi, dword [ebp - 0x94]
add esi, 2
nop dword [eax]
mov eax, dword [ebp - 0x98]
movzx edx, byte [ecx + eax]
movzx eax, byte [esi - 2]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 2], al
movzx eax, byte [esi - 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi - 1], al
movzx eax, byte [esi]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x88]
shr eax, 8
inc ecx
mov byte [esi], al
add esi, edi
mov eax, dword [ebx]
mov dword [ebp - 0x88], ecx
cmp ecx, dword [eax]
jb 0x44d810
mov edi, dword [ebp - 0xa4]
mov ecx, eax
jmp 0x44db90
call dword [ebp - 0x88]
mov ecx, dword [ebx]
add esp, 0x18
jmp 0x44db90
xor edx, edx
cmp dword [ecx], edx
jbe 0x44d8c1
inc esi
mov al, byte [edx + edi]
inc edx
mov byte [esi + 1], al
mov byte [esi], al
mov byte [esi - 1], al
mov byte [esi + 2], 0xff
mov eax, dword [ebx]
add esi, dword [ebp - 0x94]
cmp edx, dword [eax]
jb 0x44d8a5
mov ecx, dword [ebx]
jmp 0x44db90
cmp dword [ebp - 0xb8], 0
je 0x44d9cb
mov eax, dword [ecx]
mov dword [ebp - 0x88], 0
cmp edx, 1
jne 0x44d955
test eax, eax
je 0x44db90
mov eax, dword [ebp - 0xa4]
mov edx, eax
mov ecx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
sub ecx, eax
sub edi, eax
mov dword [ebp - 0xa8], ecx
sub esi, eax
jmp 0x44d916
mov ecx, dword [ebp - 0xa8]
movzx eax, byte [ecx + edx]
lea edx, [edx + 1]
imul ecx, eax, 0x1d
movzx eax, byte [edi + edx - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edx - 1]
imul eax, eax, 0x4d
add ecx, eax
mov eax, dword [ebp - 0x88]
shr ecx, 8
inc eax
mov byte [esi + edx - 1], cl
mov ecx, dword [ebx]
mov dword [ebp - 0x88], eax
cmp eax, dword [ecx]
jb 0x44d910
jmp 0x44db8a
test eax, eax
je 0x44db90
mov eax, dword [ebp - 0xa4]
mov edx, eax
mov edi, dword [ebp - 0xa0]
mov ecx, dword [ebp - 0x9c]
sub edi, eax
sub ecx, eax
mov dword [ebp - 0xa8], ecx
jmp 0x44d986
mov ecx, dword [ebp - 0xa8]
movzx eax, byte [edx + ecx]
lea edx, [edx + 1]
imul ecx, eax, 0x1d
lea esi, [esi + 2]
movzx eax, byte [edx + edi - 1]
imul eax, eax, 0x96
add ecx, eax
movzx eax, byte [edx - 1]
imul eax, eax, 0x4d
mov byte [esi - 1], 0xff
add ecx, eax
mov eax, dword [ebp - 0x88]
shr ecx, 8
inc eax
mov byte [esi - 2], cl
mov ecx, dword [ebx]
mov dword [ebp - 0x88], eax
cmp eax, dword [ecx]
jb 0x44d980
jmp 0x44db8a
cmp dword [ecx + 8], 4
jne 0x44db40
mov eax, dword [ebx + 0x47e8]
test eax, eax
jne 0x44dad8
mov dword [ebp - 0x88], eax
cmp dword [ecx], eax
jbe 0x44db90
mov ecx, dword [ebp - 0x98]
mov edx, ecx
mov eax, dword [ebp - 0xa0]
mov edi, dword [ebp - 0xa4]
sub eax, ecx
mov dword [ebp - 0xa8], eax
sub edi, ecx
mov eax, dword [ebp - 0x9c]
sub eax, ecx
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0xbc], edi
mov dword [ebp - 0xc0], eax
nop dword [eax]
movzx eax, byte [edx]
mov ecx, dword [ebp - 0xa8]
movzx edi, byte [edx + edi]
mov ebx, dword [ebp - 0xc0]
imul edi, eax
movzx ecx, byte [edx + ecx]
imul ecx, eax
movzx edx, byte [edx + ebx]
imul edx, eax
mov ebx, dword [ebp - 0xc4]
sub edi, 0xffffff80
mov byte [esi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
sub edx, 0xffffff80
add eax, ecx
shr eax, 8
movzx eax, al
imul ecx, eax, 0x96
mov eax, edx
shr eax, 8
add eax, edx
mov edx, dword [ebp - 0x8c]
shr eax, 8
inc edx
movzx eax, al
imul eax, eax, 0x1d
mov dword [ebp - 0x8c], edx
add ecx, eax
mov eax, edi
shr eax, 8
add eax, edi
mov edi, dword [ebp - 0xbc]
shr eax, 8
movzx eax, al
imul eax, eax, 0x4d
add ecx, eax
mov eax, dword [ebp - 0x88]
shr ecx, 8
inc eax
mov byte [esi], cl
mov ecx, dword [ebx]
add esi, dword [ebp - 0x94]
mov dword [ebp - 0x88], eax
cmp eax, dword [ecx]
jb 0x44da30
jmp 0x44db8a
cmp eax, 2
jne 0x44db40
cmp dword [ecx], 0
mov dword [ebp - 0x88], 0
jbe 0x44db90
mov edi, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x98]
sub edi, edx
nop
mov al, byte [edi + edx]
lea edx, [edx + 1]
not al
movzx ecx, al
movzx eax, byte [edx - 1]
imul ecx, eax
mov byte [esi + 1], 0xff
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [esi], al
mov eax, dword [ebp - 0x88]
mov ecx, dword [ebx]
inc eax
add esi, dword [ebp - 0x94]
mov dword [ebp - 0x88], eax
cmp eax, dword [ecx]
jb 0x44db00
jmp 0x44db8a
mov eax, dword [ecx]
cmp edx, 1
jne 0x44db67
xor edx, edx
test eax, eax
je 0x44db90
mov edi, dword [ebp - 0xa4]
sub edi, esi
mov al, byte [edi + esi]
lea esi, [esi + 1]
mov byte [esi - 1], al
inc edx
mov ecx, dword [ebx]
cmp edx, dword [ecx]
jb 0x44db55
jmp 0x44db8a
xor edx, edx
test eax, eax
je 0x44db90
nop dword [eax]
mov eax, dword [ebp - 0xa4]
lea esi, [esi + 2]
mov al, byte [edx + eax]
inc edx
mov byte [esi - 2], al
mov byte [esi - 1], 0xff
mov ecx, dword [ebx]
cmp edx, dword [ecx]
jb 0x44db70
mov edi, dword [ebp - 0xa4]
mov eax, dword [ebp - 0xb4]
inc eax
mov dword [ebp - 0xb4], eax
cmp eax, dword [ecx + 4]
jb 0x44d520
mov esi, dword [ebp - 0x90]
push 0
push dword [ecx + 8]
push ebx
call fcn.004517f0
mov eax, dword [ebx]
add esp, 0xc
mov ecx, dword [ebp - 0xc8]
mov edx, dword [ebp - 0xd0]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, dword [ebx]
mov ecx, dword [ebp - 0xcc]
mov eax, dword [eax + 4]
mov dword [ecx], eax
test edx, edx
je 0x44dbf1
mov eax, dword [ebx]
xor ecx, ecx
cmp dword [eax + 8], 3
setge cl
lea ecx, [ecx*2 + 1]
mov dword [edx], ecx
mov eax, esi
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00490604
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x51d614]
mov eax, dword fs:[0x2c]
pop ebx
mov eax, dword [eax + ecx*4]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov dword [eax + 0xc], str.bad_req_comp
xor eax, eax
call fcn.00490604
mov esp, ebp
pop ebp
ret