Function at 0x10003791
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov ecx, dword [0x10007753]
sub ecx, 0x423447d0
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
sub edx, 0x508e55f2
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x44], 0x673acc14
mov eax, dword [ebp - 0xc]
sub eax, 0x508e55db
push eax
call fcn.100036aa
mov word [ebp - 0x44], 0x6a3
mov eax, dword [0x1000b299]
xor edx, edx
div dword [0x10007757]
mov dword [ebp - 0x34], eax
call fcn.10003e59
mov word [ebp - 0x3c], 0x4ba4
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0xc]
sub ecx, 0x508e55e7
push ecx
mov dword [ebp - 0x34], 0x8fe438ea
mov edx, dword [ebp - 0x4c]
sub edx, ecx
mov dword [ebp - 0x4c], edx
mov word [ebp - 0x44], 0xf3ce
call fcn.100036aa
lea eax, [ebp - 0x14]
mov byte [ebp - 0x4c], 0x12
push eax
mov eax, dword [ebp - 0xc]
cmp eax, dword [0x10007757]
je 0x10003901
mov dword [ebp - 0x3c], 0xff1863a1
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.10003f7a
shl edx, 0xc
test eax, eax
je 0x10003847
xor eax, eax
jmp 0x10003a4c
mov byte [ebp - 0x44], 0x17
mov edx, dword [ebp - 0xc]
add edx, 0xaf71aa31
push edx
call fcn.100036aa
mov dword [ebp - 0x34], ecx
lea edx, [ebp - 0x20]
push edx
mov dword [ebp - 0x34], 0x552b7e3e
mov ecx, dword [ebp - 0xc]
add ecx, 0xaf71aa4e
push ecx
mov word [ebp - 0x2c], 0x478d
cmp dword [ebp - 0xc], 0
je 0x1000385d
mov edx, dword [ebp - 0xc]
cmp edx, dword [0x10007753]
je 0x100039da
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x3c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x4c]
and eax, edx
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0xc], 0
je 0x100039ef
mov word [ebp - 0x34], 0xc718
mov ecx, dword [ebp - 0xc]
add ecx, 0xaf71c80e
push ecx
mov dword [ebp - 0x34], 0x81b71832
push 0x10004a80
call dword [ebp - 0x14]
mov byte [ebp - 0x34], 0xc6
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0xc]
add ecx, 0xaf71aa0e
cmp dword [ebp - 8], ecx
jne 0x100038ec
mov word [ebp - 0x2c], 0x522d
xor eax, eax
mov dword [ebp - 0x4c], eax
jmp 0x10003a4c
mov eax, dword [ebp - 0xc]
add eax, 0xaf71aa19
push eax
mov byte [ebp - 0x34], 0x87
call fcn.100036aa
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x4c], ecx
mov edx, dword [0x10007757]
sub edx, 0x9495ac4d
mov dword [ebp - 0x20], edx
mov edx, dword [0x10007757]
add edx, 0x6b6a53b3
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0xc]
add eax, 0xaf71c80e
cmp dword [ebp - 0x20], eax
jae 0x10003a25
mov dword [ebp - 0x4c], 0xc7e5fb29
mov edx, dword [ebp - 0xc]
add edx, 0xaf71aa73
cmp dword [ebp - 0x1c], edx
jb 0x10003961
mov dword [ebp - 0x2c], 0x9462713f
mov edx, dword [ebp - 0xc]
add edx, 0xaf71aa0e
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x20]
movzx ecx, byte [eax + 0x10004a80]
mov dword [ebp - 0x4c], 0x3e5a454f
mov dword [ebp - 4], ecx
cmp dword [ebp - 0xc], 0
jne 0x10003980
call fcn.10003e59
mov edx, dword [ebp - 0x18]
mov eax, dword [0x10007753]
sub eax, 0x92c29da6
add edx, eax
mov dword [ebp - 0x44], 0xa53c2cc3
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + str.M_QH]
and ecx, 0xff
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x18]
mov word [ebp - 0x2c], 0x6260
mov ecx, dword [ebp - 0xc]
add ecx, 0xaf71aa62
sub edx, ecx
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 4]
xor eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
mov byte [ecx + 0x10004a80], al
mov word [ebp - 0x2c], 0x23a3
cmp dword [ebp - 0xc], 0
jne 0x100039ef
push 0xf3b83123
push 0x23d719ae
call fcn.10003f7a
mov edx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
sub ecx, 0x508e55f1
add edx, ecx
mov dword [ebp - 0x20], edx
mov word [ebp - 0x4c], 0x1d39
mov eax, dword [ebp - 0x1c]
mov edx, dword [0x10007753]
sub edx, 0x92c29dc1
add eax, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x34], ecx
jmp 0x10003925
mov eax, dword [ebp - 0xc]
add eax, 0x4234
cmp eax, dword [0x10007757]
je 0x10003a1d
mov byte [ebp - 0x44], 0x83
mov edx, dword [ebp - 0xc]
sub edx, 0x508e55eb
push edx
call fcn.100036aa
mov byte [ebp - 0x3c], 0xae
mov esp, ebp
pop ebp
ret