Function at 0x100af980
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x58
mov ecx, dword [esp + 0xac]
xor eax, eax
cmp dword [ecx], 3
push ebx
push ebp
sete al
push esi
push edi
push 0x4a
push 0
movzx edx, ax
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x1c], edx
call fcn.1002a420
mov esi, dword [esp + 0x88]
mov ecx, dword [esi + 0x4e0]
mov ebp, dword [esi + 0x4dc]
mov edx, dword [esi + 0x4e4]
add esp, 0xc
cmp word [esi + 0x202], 0
mov edi, 1
mov dword [esp + 0x4e], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x18], edx
jne 0x100afa4b
xor ecx, ecx
lea edx, [esi + 4]
jmp 0x100af9f0
movzx eax, cx
cmp ebp, 0xa
jne 0x100afa04
lea ebx, [eax*4]
mov word [edx], bx
jmp 0x100afa34
cmp ebp, 0xc
jne 0x100afa13
mov ebx, eax
shl ebx, 4
mov word [edx], bx
jmp 0x100afa34
cmp ebp, 0xe
jne 0x100afa22
mov ebx, eax
shl ebx, 6
mov word [edx], bx
jmp 0x100afa34
cmp ebp, 0x10
jne 0x100afa31
mov ebx, eax
shl ebx, 8
mov word [edx], bx
jmp 0x100afa34
mov word [edx], ax
shl eax, 4
mov word [edx + 0x200], ax
add ecx, edi
add edx, 2
cmp ecx, 0x100
jl 0x100af9f0
mov eax, dword [esi + 0x408]
test eax, eax
jne 0x100afaf6
cmp dword [esi + 0x404], eax
jne 0x100afaf6
mov dword [esi + 0x404], eax
cmp ebp, 0xc
jne 0x100afa7c
mov dword [esi + 0x408], 0xfff
jmp 0x100afab7
cmp ebp, 0xe
jne 0x100afa8d
mov dword [esi + 0x408], 0x3fff
jmp 0x100afab7
cmp ebp, 0x10
jne 0x100afa9e
mov dword [esi + 0x408], 0xffff
jmp 0x100afab7
mov eax, ebp
sub eax, 0xa
neg eax
sbb eax, eax
and eax, 0xfffffd00
add eax, 0x3ff
mov dword [esi + 0x408], eax
cmp dword [esi + 0x554], 0
je 0x100afade
mov ecx, dword [esi + 0x408]
lea eax, [ecx + 1]
cdq
sub eax, edx
sar eax, 1
neg eax
mov dword [esi + 0x404], eax
add eax, ecx
mov dword [esi + 0x408], eax
mov ecx, dword [esi + 0x404]
mov eax, dword [esi + 0x408]
mov dword [esi + 0x42c], ecx
mov dword [esi + 0x430], eax
mov ecx, dword [esi + 0x430]
fld qword [esi + 0x40c]
mov ebx, dword [esi + 0x4ec]
fstp qword [esi + 0x434]
mov edx, dword [esi + 0x404]
fld qword [esi + 0x414]
mov dword [esi + 0x45c], ecx
fstp qword [esi + 0x43c]
mov ecx, dword [esi + 0x4e8]
imul ecx, ebx
mov dword [esi + 0x44c], edx
mov edx, dword [esi + 0x4f4]
mov dword [esp + 0xbc], edx
mov edx, dword [esp + 0x70]
mov dword [esi + 0x450], eax
mov eax, dword [esi + 0x42c]
mov dword [esi + 0x458], eax
cmp edx, ecx
jae 0x100afb80
lea esp, [esp]
inc edi
xor edx, edx
movzx ebp, di
mov eax, ecx
div ebp
xor edx, edx
div ebp
mov edx, dword [esp + 0x70]
cmp edx, eax
jb 0x100afb60
mov ebp, dword [esp + 0x7c]
cmp di, 1
jne 0x100afb8b
mov dword [esp + 0xb0], 0
test ecx, ecx
jbe 0x100afbfe
mov dword [esp + 0x70], edx
fild dword [esp + 0x70]
test edx, edx
jge 0x100afba1
fadd qword [0x101470e8]
mov dword [esp + 0x70], ecx
fild dword [esp + 0x70]
test ecx, ecx
jge 0x100afbb3
fadd qword [0x101470e8]
fdivp st(1)
call fcn.10037bb0
mov eax, ebx
mov dword [esp + 0x70], eax
fild dword [esp + 0x70]
test eax, eax
jge 0x100afbce
fadd qword [0x101470e8]
fnstcw word [esp + 0x70]
movzx eax, word [esp + 0x70]
fmulp st(1)
or eax, 0xc00
mov dword [esp + 0x7c], eax
fadd qword [0x10140ff0]
fldcw word [esp + 0x7c]
fistp dword [esp + 0x7c]
mov cx, word [esp + 0x7c]
movzx eax, cx
fldcw word [esp + 0x70]
jmp 0x100afc0a
movzx ecx, di
mov eax, ebx
xor edx, edx
div ecx
movzx eax, ax
movzx edx, ax
cmp edx, ebx
jbe 0x100afc14
movzx eax, bx
movzx ecx, word [esi + 0x554]
movzx edx, word [esi + 0x4d0]
push eax
mov eax, dword [esp + 0x14]
push eax
movzx eax, word [esi + 0x4d8]
push ecx
mov ecx, dword [esp + 0x20]
push edi
push edx
push eax
movzx eax, word [esi + 0x4d4]
push eax
mov eax, dword [esp + 0x34]
push eax
mov eax, dword [esi + 0x4e8]
push ebp
push ecx
push eax
lea edx, [esp + 0x48]
push ebx
push edx
call fcn.100a6610
movzx eax, ax
add esp, 0x34
test ax, ax
jne 0x100b03a6
mov ax, word [esp + 0xb4]
mov cx, word [esp + 0xb8]
lea edx, [esp + 0x70]
push 0
push edx
mov word [esp + 0x6a], ax
mov word [esp + 0x6c], cx
call fcn.1000a740
movzx edi, ax
add esp, 8
test di, di
je 0x100afcba
cmp dword [esp + 0x20], 0x71028338
jne 0x100afcaf
mov eax, dword [esp + 0x1c]
push eax
call fcn.10009d90
add esp, 4
mov ax, di
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
mov eax, dword [esi + 0x4ec]
imul eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x4d4]
add eax, 7
shr eax, 3
imul eax, dword [esi + 0x4e8]
test ecx, ecx
jbe 0x100afce1
imul ecx, eax
mov eax, ecx
mov ebx, dword [esp + 0xbc]
cmp ebx, eax
jle 0x100afcf5
mov ebx, eax
mov dword [esp + 0xbc], ebx
mov ebp, dword [esp + 0xb0]
test ebp, ebp
jne 0x100afe58
cmp word [esp + 0x74], bp
jbe 0x100afd16
cmp word [esp + 0x78], bp
ja 0x100afe58
mov ecx, dword [esp + 0x70]
push 0xfa000
push ecx
call fcn.10009ed0
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x100afd61
mov edx, dword [esp + 0x70]
push edx
call fcn.1000a3f0
add esp, 4
cmp dword [esp + 0x20], 0x71028338
jne 0x100afe90
mov eax, dword [esp + 0x1c]
push eax
call fcn.10009d90
add esp, 4
pop edi
pop esi
lea eax, [ebp + 0x66]
pop ebp
pop ebx
add esp, 0x58
ret
cmp dword [esp + 0xbc], 0
mov dword [esp + 0x7c], 0
jle 0x100afdea
jmp 0x100afd80
mov eax, dword [esp + 0xbc]
sub eax, dword [esp + 0x7c]
cmp eax, 0xfa000
jl 0x100afd97
mov eax, 0xfa000
mov ecx, dword [esp + 0x6c]
push eax
push ebp
push ecx
call fcn.1000b880
mov edi, eax
add esp, 0xc
test edi, edi
je 0x100afdea
cmp word [esp + 0x24], 1
push edi
push ebp
je 0x100afdc2
lea edx, [esp + 0x24]
push edx
call fcn.100a6ab0
jmp 0x100afdcc
lea eax, [esp + 0x24]
push eax
call fcn.100a6940
movzx ebx, ax
add esp, 0xc
test bx, bx
jne 0x100afe36
mov eax, dword [esp + 0x7c]
add eax, edi
cmp eax, dword [esp + 0xbc]
mov dword [esp + 0x7c], eax
jl 0x100afd80
mov eax, dword [esp + 0x70]
push eax
call fcn.1000a3f0
add esp, 4
cmp dword [esp + 0xa8], 0
je 0x100aff2e
lea ecx, [esp + 0x1c]
push ecx
call fcn.100aa590
movzx edi, ax
add esp, 4
test di, di
je 0x100aff2e
lea edx, [esp + 0x1c]
push edx
call fcn.100aa560
add esp, 4
mov ax, di
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
mov ecx, dword [esp + 0x70]
push ecx
call fcn.1000a3f0
lea edx, [esp + 0x20]
push edx
call fcn.100aa560
add esp, 8
pop edi
pop esi
pop ebp
mov ax, bx
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x70]
push ebx
push eax
call fcn.10009ed0
mov edi, eax
add esp, 8
test edi, edi
jne 0x100afe9d
mov ecx, dword [esp + 0x70]
push ecx
call fcn.1000a3f0
add esp, 4
cmp dword [esp + 0x20], 0x71028338
jne 0x100afe90
mov edx, dword [esp + 0x1c]
push edx
call fcn.10009d90
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0x66
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x6c]
push ebx
push edi
push eax
call fcn.1000b880
add esp, 0xc
cmp eax, ebx
je 0x100afee1
mov ecx, dword [esp + 0x70]
push ecx
call fcn.1000a3f0
add esp, 4
cmp dword [esp + 0x20], 0x71028338
jne 0x100afed4
mov edx, dword [esp + 0x1c]
push edx
call fcn.10009d90
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0xca
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
push eax
push ebp
push ecx
push edx
push ebx
lea eax, [esp + 0x30]
push edi
push eax
call fcn.100a6df0
movzx edi, ax
add esp, 0x1c
test di, di
je 0x100afdea
mov ecx, dword [esp + 0x70]
push ecx
call fcn.1000a3f0
lea edx, [esp + 0x20]
push edx
call fcn.100aa560
add esp, 8
mov ax, di
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
mov ebx, dword [esp + 0xa0]
mov ebp, dword [esp + 0xac]
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x84]
push ebx
push ebp
push eax
mov eax, dword [esp + 0x8c]
push 0x80
push esi
push ecx
push edx
push eax
lea ecx, [esp + 0x3c]
push ecx
mov dword [esi + 0x424], 0
call fcn.100af900
movzx edi, ax
add esp, 0x24
test di, di
jne 0x100afe1e
mov edx, dword [esp + 0x94]
test edx, edx
je 0x100b001b
cmp dword [esp + 0x98], 0
je 0x100b001b
mov ecx, dword [esp + 0x8c]
test cx, cx
je 0x100b0065
mov eax, dword [esp + 0x90]
test ax, ax
je 0x100b0065
mov edi, dword [esp + 0x98]
push ebx
push ebp
push 0x80
push esi
push edi
push edx
push eax
push ecx
lea eax, [esp + 0x3c]
push eax
mov dword [esi + 0x424], 0
call fcn.100af940
movzx edi, ax
add esp, 0x24
test di, di
je 0x100b000a
lea ecx, [esp + 0x1c]
push ecx
call fcn.100aa560
add esp, 4
mov ax, di
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x9c]
test eax, eax
je 0x100b001b
mov dword [eax], 1
lea eax, [esp + 0x1c]
push eax
call fcn.100aa560
movzx eax, ax
add esp, 4
test ax, ax
jne 0x100b03a6
cmp dword [esi + 0x554], 0
mov dword [esp + 0x10], 0
je 0x100b004d
mov dword [esp + 0x10], 0x8000
mov eax, dword [esi + 0x55c]
test al, 8
je 0x100b007f
fld qword [esi + 0x560]
fld qword [esi + 0x568]
jmp 0x100b0083
lea edx, [esp + 0x1c]
push edx
call fcn.100aa560
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x58
ret
fldz
fld1
test al, 2
je 0x100b0242
mov eax, dword [esi + 0x64c]
fstp st(1)
mov ebx, dword [esi + 0x648]
fstp st(0)
lea ecx, [eax + ebx]
cmp ecx, 0x10000
mov dword [esp + 0x14], eax
jle 0x100b00b1
movsx edx, ax
mov dword [esp + 0x14], edx
lea eax, [esi + 0x65c]
push 0x10146b18
push eax
call fcn.100338a0
add esp, 8
test eax, eax
jne 0x100b0189
cmp dword [esi], 1
mov eax, dword [esi + 0x654]
movsx eax, word [eax + ebx*2 - 2]
mov edi, eax
mov ebp, eax
mov dword [esp + 0x7c], edi
mov dword [esp + 0xbc], ebp
jne 0x100b0142
lea ecx, [esi + 4]
mov dword [esp + 0xbc], 0x100
lea ebx, [ebx]
movzx eax, word [ecx]
sub eax, dword [esp + 0x14]
sub eax, dword [esp + 0x10]
jns 0x100b010f
xor eax, eax
cmp eax, ebx
jl 0x100b0116
lea eax, [ebx - 1]
mov edx, dword [esi + 0x654]
movsx eax, word [edx + eax*2]
cmp edi, eax
jle 0x100b0126
mov edi, eax
cmp ebp, eax
jge 0x100b012c
mov ebp, eax
add ecx, 2
sub dword [esp + 0xbc], 1
jne 0x100b0100
mov dword [esp + 0x7c], edi
jmp 0x100b028c
mov eax, ebx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
cmp eax, 1
jge 0x100b015a
mov eax, 1
xor edx, edx
test ebx, ebx
jle 0x100b0293
mov ecx, dword [esi + 0x654]
movsx ecx, word [ecx + edx*2]
cmp edi, ecx
jle 0x100b0174
mov edi, ecx
cmp ebp, ecx
jge 0x100b017a
mov ebp, ecx
add edx, eax
cmp edx, ebx
jl 0x100b0164
mov dword [esp + 0x7c], edi
jmp 0x100b028c
cmp dword [esi], 1
mov edx, dword [esi + 0x654]
movzx eax, word [edx + ebx*2 - 2]
mov edi, eax
mov ebp, eax
mov dword [esp + 0x7c], edi
mov dword [esp + 0xbc], ebp
jne 0x100b01fa
lea ecx, [esi + 4]
mov dword [esp + 0x7c], 0x100
movzx eax, word [ecx]
sub eax, dword [esp + 0x14]
sub eax, dword [esp + 0x10]
jns 0x100b01c2
xor eax, eax
cmp eax, ebx
jl 0x100b01c9
lea eax, [ebx - 1]
movzx eax, word [edx + eax*2]
cmp edi, eax
jle 0x100b01d3
mov edi, eax
mov ebp, dword [esp + 0xbc]
cmp ebp, eax
jge 0x100b01e7
mov ebp, eax
mov dword [esp + 0xbc], ebp
add ecx, 2
sub dword [esp + 0x7c], 1
jne 0x100b01b3
mov dword [esp + 0x7c], edi
jmp 0x100b0293
mov eax, ebx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
cmp eax, 1
jge 0x100b0212
mov eax, 1
xor edx, edx
test ebx, ebx
jle 0x100b0293
jmp 0x100b0220
mov ecx, dword [esi + 0x654]
movzx ecx, word [ecx + edx*2]
cmp edi, ecx
jle 0x100b0230
mov edi, ecx
cmp ebp, ecx
jge 0x100b0236
mov ebp, ecx
add edx, eax
cmp edx, ebx
jl 0x100b0220
mov dword [esp + 0x7c], edi
jmp 0x100b028c
mov ecx, dword [esi + 0x404]
mov ebx, dword [esp + 0x10]
sub ecx, ebx
mov dword [esp + 0xbc], ecx
fild dword [esp + 0xbc]
fmul st(1)
fadd st(2)
call fcn.1012b4f0
mov edx, dword [esi + 0x408]
sub edx, ebx
mov dword [esp + 0xbc], edx
fild dword [esp + 0xbc]
mov edi, eax
mov dword [esp + 0x7c], edi
fmulp st(1)
faddp st(1)
call fcn.1012b4f0
mov ebp, eax
mov dword [esp + 0xbc], ebp
fld qword [esi + 0x414]
fmul qword [0x10147038]
fld qword [esi + 0x40c]
fadd st(1)
fild dword [esp + 0x7c]
fcompp
fnstsw ax
test ah, 1
je 0x100b02cc
fsubr qword [esi + 0x40c]
fild dword [esp + 0xbc]
fcompp
fnstsw ax
test ah, 0x41
jp 0x100b030c
jmp 0x100b02ce
fstp st(0)
lea eax, [edi + ebp]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0xbc], eax
sub ebp, edi
fild dword [esp + 0xbc]
mov dword [esp + 0xbc], ebp
fst qword [esi + 0x40c]
fild dword [esp + 0xbc]
fst qword [esi + 0x414]
fstp qword [esi + 0x43c]
fstp qword [esi + 0x434]
cmp dword [esi + 0x4d0], 1
jne 0x100b03a4
mov esi, dword [esp + 0x84]
test esi, esi
je 0x100b0361
cmp dword [esi], 0
je 0x100b0361
xor eax, eax
jmp 0x100b0330
mov ecx, dword [esi]
lea ecx, [ecx + eax + 0x2a]
or dl, 0xff
sub dl, byte [ecx]
mov byte [ecx], dl
mov ecx, dword [esi]
lea ecx, [ecx + eax + 0x29]
or dl, 0xff
sub dl, byte [ecx]
mov byte [ecx], dl
mov ecx, dword [esi]
lea ecx, [ecx + eax + 0x28]
or dl, 0xff
sub dl, byte [ecx]
add eax, 4
cmp eax, 0x400
mov byte [ecx], dl
jl 0x100b0330
mov esi, dword [esp + 0x98]
test esi, esi
je 0x100b03a4
cmp dword [esi], 0
je 0x100b03a4
xor eax, eax
mov ecx, dword [esi]
lea ecx, [eax + ecx + 0x2a]
or dl, 0xff
sub dl, byte [ecx]
mov byte [ecx], dl
mov ecx, dword [esi]
lea ecx, [eax + ecx + 0x29]
or dl, 0xff
sub dl, byte [ecx]
mov byte [ecx], dl
mov ecx, dword [esi]
lea ecx, [eax + ecx + 0x28]
or dl, 0xff
sub dl, byte [ecx]
add eax, 4
cmp eax, 0x400
mov byte [ecx], dl
jl 0x100b0373
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret