Function at 0x406df9
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov eax, dword [0x442008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0xc]
inc ebx
mov ecx, edi
mov byte [ebp - 0x55], bl
call fcn.0040c221
push 0x440570
lea eax, [ebp - 0x60]
push esi
push eax
call fcn.0041bb67
add esp, 0xc
test eax, eax
jne 0x407413
imul ecx, dword [edi + 0xa0018], 0x4c
or dword [ebp - 0x80], 0xffffffff
and dword [ebp - 0x7c], 0
movzx eax, byte [ecx + edi + 0x299]
movzx esi, byte [ecx + edi + 0x298]
movzx ecx, byte [ecx + edi + 0x296]
mov dword [ebp - 0x8c], eax
imul eax, dword [edi + 0xa0014], 0x120
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x90], ecx
mov edx, dword [eax + edi + 0xc08]
mov dword [ebp - 0x94], edx
mov edx, dword [eax + edi + 0xc00]
imul edx, esi
mov dword [ebp - 0x74], edx
movzx edx, byte [eax + edi + 0xc14]
mov dword [ebp - 0xa4], edx
mov edx, dword [eax + edi + 0xc18]
test edx, edx
movzx eax, byte [eax + edi + 0xc0c]
cmove edx, dword [ebp - 0x80]
mov dword [ebp - 0xa0], edx
mov edx, dword [edi + 0xa0014]
mov dword [ebp - 0xb8], eax
test eax, eax
je 0x406efe
mov edx, 0x8008
mov esi, eax
imul eax, dword [edi + 0xa0018], 0x4c
mov ecx, dword [edi + 0x8fb5c]
mov eax, dword [eax + edi + 0x288]
mov dword [edx + ecx], eax
lea edx, [edx + 4]
sub esi, 1
jne 0x406ed6
mov edx, dword [edi + 0xa0014]
mov esi, dword [ebp - 0x64]
and dword [ebp - 0x84], 0
mov ecx, edi
and dword [ebp - 0x70], 0
imul eax, edx, 0x120
mov dword [ebp - 0x98], esi
mov eax, dword [eax + edi + 0xcc0]
mov dword [ebp - 0x88], eax
call fcn.00408926
test al, al
je 0x406f57
mov ecx, dword [ebp - 0x88]
mov eax, 0x1d000000
imul ecx, esi
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x70], 0x1fc00000
mov dword [ebp - 0x98], 2
sub eax, ecx
add dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x88]
imul eax, esi
push 0x50
push 0
add eax, dword [ebp - 0x70]
mov dword [ebp - 0xac], eax
imul eax, dword [edi + 0xa0014], 0x120
mov eax, dword [eax + edi + 0xc00]
sub eax, dword [ebp - 0x88]
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0x54]
push eax
call fcn.00413420
push dword [ebp - 0x60]
call fcn.0041bd50
add esp, 0x10
test eax, eax
jne 0x407420
push dword [ebp - 0x60]
lea eax, [ebp - 0x54]
push 0x50
push eax
call fcn.0041b80b
add esp, 0xc
test eax, eax
je 0x4073f5
mov eax, dword [ebp - 0x54]
cmp al, 0x3a
jne 0x4073c7
lea eax, [ebp - 0x54]
push eax
call fcn.00417bf0
pop ecx
cmp eax, 0xb
jb 0x4073c4
push 2
lea eax, [ebp - 0x53]
push eax
call fcn.00407529
mov ebx, eax
lea eax, [ebp - 0x51]
push 4
push eax
mov dword [ebp - 0x80], ebx
call fcn.00407529
add eax, dword [ebp - 0x7c]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x4d]
push 2
push eax
call fcn.00407529
mov esi, eax
test esi, esi
jne 0x407379
lea eax, [ebp - 0x54]
push eax
call fcn.00417bf0
pop ecx
lea ecx, [ebx*2 + 0xb]
cmp eax, ecx
jl 0x40734c
test ebx, ebx
jle 0x40734c
mov edx, dword [ebp - 0x94]
lea ebx, [ebp - 0x4b]
mov esi, dword [ebp - 0x5c]
mov ecx, edx
sub ecx, dword [ebp - 0x70]
mov eax, esi
mov dword [ebp - 0xb0], ecx
sub eax, edx
mov ecx, edx
mov dword [ebp - 0xa8], ebx
sub ecx, dword [ebp - 0xa0]
mov dword [ebp - 0xbc], ecx
mov ecx, edx
sub ecx, dword [ebp - 0x84]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0xc0], ecx
add eax, ecx
cdq
idiv dword [ebp - 0x64]
push 2
mov dword [ebp - 0x78], eax
mov eax, esi
cdq
idiv dword [ebp - 0x64]
push ebx
mov dword [ebp - 0x68], edx
call fcn.00407529
mov ebx, eax
mov eax, dword [ebp - 0x68]
or ebx, 0xffffff00
test eax, eax
jle 0x4070ab
shl ebx, 8
or ebx, 0xff
sub eax, 1
jne 0x40709d
cmp esi, dword [ebp - 0x74]
jge 0x4070c6
cmp esi, dword [ebp - 0x84]
jl 0x4070c6
mov eax, dword [edi + 0x8fb5c]
mov ecx, dword [ebp - 0x78]
mov eax, dword [eax]
and dword [eax + ecx*4], ebx
cmp dword [ebp - 0x88], 0
jbe 0x407100
cmp esi, dword [ebp - 0x70]
jl 0x407100
cmp esi, dword [ebp - 0xac]
jge 0x407100
mov eax, dword [ebp - 0x6c]
xor edx, edx
add eax, dword [ebp - 0xb0]
div dword [ebp - 0x64]
mov ecx, eax
mov eax, dword [edi + 0x8fb5c]
add ecx, dword [ebp - 0xb4]
mov dword [ebp - 0x78], ecx
mov eax, dword [eax]
and dword [eax + ecx*4], ebx
mov eax, dword [ebp - 0x94]
cmp esi, eax
jl 0x407168
test eax, eax
je 0x407168
imul eax, dword [edi + 0xa0014], 0x120
movzx esi, word [eax + edi + 0xc04]
test si, si
je 0x407165
mov eax, dword [ebp - 0x6c]
cdq
idiv dword [ebp - 0x8c]
mov ecx, eax
cmp ecx, esi
jge 0x407165
mov eax, dword [ebp - 0x8c]
cmp eax, dword [ebp - 0x64]
je 0x40715b
mov eax, dword [ebp - 0x68]
cdq
idiv dword [ebp - 0x8c]
mov eax, dword [ebp - 0x68]
sub eax, edx
test eax, eax
jle 0x40715b
shr ebx, 8
sub eax, 1
jne 0x407153
mov eax, dword [edi + 0x8fb5c]
and dword [eax + ecx*4 + 8], ebx
mov esi, dword [ebp - 0x5c]
imul eax, dword [edi + 0xa0014], 0x120
mov dword [ebp - 0x9c], eax
mov ecx, dword [eax + edi + 0xc10]
cmp esi, ecx
jl 0x4072c4
cmp dword [ebp - 0xb8], 0
jbe 0x4072c4
mov eax, esi
sub eax, ecx
mov ecx, dword [ebp - 0x98]
cdq
idiv ecx
mov edx, eax
mov eax, dword [ebp - 0x9c]
mov al, byte [eax + edi + 0xc9c]
and al, 0xf0
cmp al, 0xa0
je 0x4071ba
cmp al, 0xb0
jne 0x4071dc
lea eax, [edx - 1]
cmp eax, 6
jbe 0x4071c7
test dl, 1
je 0x4071ce
mov edx, 0xff
jmp 0x4071dc
test edx, edx
jle 0x4071dc
lea eax, [edx - 6]
cdq
sub eax, edx
mov edx, eax
sar edx, 1
cmp ecx, dword [ebp - 0x64]
je 0x4071fc
cmp dword [ebp - 0x68], 1
jle 0x4071fc
imul eax, dword [edi + 0xa0018], 0x4c
mov ecx, ebx
shr ecx, 0x10
mov ebx, dword [eax + edi + 0x288]
and ebx, ecx
mov eax, dword [ebp - 0x9c]
movzx eax, byte [eax + edi + 0xc0c]
cmp edx, eax
jge 0x4072c4
mov eax, dword [edi + 0x8fb5c]
lea ecx, [eax + edx*4]
imul eax, dword [edi + 0xa0014], 0x90
add eax, edx
movzx eax, word [edi + eax*2 + 0xc20]
and eax, ebx
and dword [ecx + 0x8008], eax
cmp esi, dword [ebp - 0x74]
jge 0x4072c4
mov eax, dword [edi + 0x8fb5c]
mov esi, dword [ebp - 0x78]
shl esi, 2
mov ecx, dword [eax]
imul eax, dword [edi + 0xa0014], 0x90
add eax, edx
movzx eax, word [edi + eax*2 + 0xc20]
and eax, ebx
and dword [ecx + esi], eax
mov eax, dword [edi + 0x8fb5c]
mov ecx, dword [eax]
imul eax, dword [edi + 0xa0018], 0x4c
add ecx, esi
cmp dword [eax + edi + 0x288], 0xffff
jne 0x40728d
or dword [ecx], 0xf000
jmp 0x4072c1
or dword [ecx], 0xff0000
imul eax, dword [edi + 0xa0014], 0x90
add edx, eax
mov eax, dword [edi + 0x8fb5c]
mov esi, dword [eax]
movzx ecx, word [edi + edx*2 + 0xc20]
movzx eax, word [edi + edx*2 + 0xc44]
not ecx
and ecx, eax
mov eax, dword [ebp - 0x78]
or dword [esi + eax*4], ecx
mov esi, dword [ebp - 0x5c]
cmp dword [ebp - 0xa4], 0
jbe 0x407322
cmp esi, dword [ebp - 0xa0]
jl 0x407322
mov eax, dword [ebp - 0x6c]
add eax, dword [ebp - 0xbc]
cdq
idiv dword [ebp - 0x90]
mov ecx, eax
cmp ecx, dword [ebp - 0xa4]
jge 0x407322
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0x64]
je 0x407315
mov eax, dword [ebp - 0x68]
cdq
idiv dword [ebp - 0x90]
mov eax, dword [ebp - 0x68]
sub eax, edx
test eax, eax
jle 0x407315
shr ebx, 8
sub eax, 1
jne 0x40730d
mov eax, dword [edi + 0x8fb5c]
and dword [eax + ecx*4 + 0x8050], ebx
mov eax, dword [ebp - 0x6c]
inc esi
mov ebx, dword [ebp - 0xa8]
inc eax
mov ecx, dword [ebp - 0xc0]
add ebx, 2
sub dword [ebp - 0x80], 1
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0xa8], ebx
jne 0x407074
xor ebx, ebx
inc ebx
push dword [ebp - 0x60]
call fcn.0041bd50
pop ecx
test eax, eax
je 0x406fa6
cmp byte [ebp - 0x55], 0
jne 0x407420
push 0x43257c
call fcn.00401036
jmp 0x40741f
cmp esi, 2
je 0x407383
cmp esi, 4
jne 0x4073bb
lea eax, [ebp - 0x54]
push eax
call fcn.00417bf0
pop ecx
lea ecx, [ebx*2 + 0xb]
cmp eax, ecx
jl 0x4073a5
push 4
lea eax, [ebp - 0x4b]
push eax
call fcn.00407529
jmp 0x4073a8
mov eax, dword [ebp - 0x7c]
cmp esi, 2
jne 0x4073b5
shl eax, 4
mov dword [ebp - 0x7c], eax
jmp 0x40734c
shl eax, 0x10
mov dword [ebp - 0x7c], eax
xor ebx, ebx
inc ebx
cmp esi, ebx
je 0x407360
jmp 0x40734f
mov eax, dword [ebp - 0x54]
cmp al, 0xa
je 0x40734f
cmp byte [ebp - 0x55], 0
je 0x4073e0
push str.Hex_file_comments:_n
call fcn.00401036
pop ecx
mov byte [ebp - 0x55], 0
lea eax, [ebp - 0x54]
push eax
push 0x432558
call fcn.00401036
pop ecx
pop ecx
jmp 0x40734f
push str._n_Error_reading_hex_file._n
call fcn.00401036
cmp dword [ebp - 0x60], 0
pop ecx
je 0x40740f
push dword [ebp - 0x60]
call fcn.0041b6c6
pop ecx
xor al, al
jmp 0x407431
push str._n_Hex_file_not_found._n
call fcn.00401036
xor bl, bl
pop ecx
cmp dword [ebp - 0x60], 0
je 0x40742f
push dword [ebp - 0x60]
call fcn.0041b6c6
pop ecx
mov al, bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004125a9
leave
ret 8