Function at 0x406df9
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc
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.0040c612
push 0x440570
lea eax, [ebp - 0x60]
push esi
push eax
call fcn.0041bf37
add esp, 0xc
test eax, eax
jne 0x407404
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 - 0x94], ecx
mov edx, dword [eax + edi + 0xc08]
mov dword [ebp - 0x98], edx
mov edx, dword [eax + edi + 0xc00]
imul edx, esi
mov dword [ebp - 0x74], edx
movzx edx, byte [eax + edi + 0xc14]
mov dword [ebp - 0xa0], edx
mov edx, dword [eax + edi + 0xc18]
test edx, edx
movzx eax, byte [eax + edi + 0xc0c]
cmove edx, dword [ebp - 0x80]
mov dword [ebp - 0x9c], edx
mov edx, dword [edi + 0xa0014]
mov dword [ebp - 0xb4], 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 - 0x90], esi
mov eax, dword [eax + edi + 0xcc0]
mov dword [ebp - 0x88], eax
call fcn.00408917
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 - 0x90], 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 - 0xa8], eax
imul eax, dword [edi + 0xa0014], 0x120
mov eax, dword [eax + edi + 0xc00]
sub eax, dword [ebp - 0x88]
mov dword [ebp - 0xb0], eax
lea eax, [ebp - 0x54]
push eax
call fcn.004137f0
push dword [ebp - 0x60]
call fcn.0041c120
add esp, 0x10
test eax, eax
jne 0x407411
push dword [ebp - 0x60]
lea eax, [ebp - 0x54]
push 0x50
push eax
call fcn.0041bbdb
add esp, 0xc
test eax, eax
je 0x4073e6
mov eax, dword [ebp - 0x54]
cmp al, 0x3a
jne 0x4073b8
lea eax, [ebp - 0x54]
push eax
call fcn.00417fc0
pop ecx
cmp eax, 0xb
jb 0x4073b5
push 2
lea eax, [ebp - 0x53]
push eax
call fcn.0040751a
mov ebx, eax
lea eax, [ebp - 0x51]
push 4
push eax
mov dword [ebp - 0x80], ebx
call fcn.0040751a
add eax, dword [ebp - 0x7c]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x4d]
push 2
push eax
call fcn.0040751a
mov esi, eax
test esi, esi
jne 0x40736a
lea eax, [ebp - 0x54]
push eax
call fcn.00417fc0
pop ecx
lea ecx, [ebx*2 + 0xb]
cmp eax, ecx
jl 0x40733d
test ebx, ebx
jle 0x40733d
mov edx, dword [ebp - 0x98]
lea ebx, [ebp - 0x4b]
mov esi, dword [ebp - 0x5c]
mov ecx, edx
sub ecx, dword [ebp - 0x70]
mov eax, esi
mov dword [ebp - 0xac], ecx
sub eax, edx
mov ecx, edx
mov dword [ebp - 0xa4], ebx
sub ecx, dword [ebp - 0x9c]
mov dword [ebp - 0xb8], ecx
mov ecx, edx
sub ecx, dword [ebp - 0x84]
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0xbc], 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.0040751a
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 - 0xa8]
jge 0x407100
mov eax, dword [ebp - 0x6c]
xor edx, edx
add eax, dword [ebp - 0xac]
div dword [ebp - 0x64]
mov ecx, eax
mov eax, dword [edi + 0x8fb5c]
add ecx, dword [ebp - 0xb0]
mov dword [ebp - 0x78], ecx
mov eax, dword [eax]
and dword [eax + ecx*4], ebx
mov eax, dword [ebp - 0x98]
cmp esi, eax
jl 0x407165
test eax, eax
je 0x407165
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 [edi + 0xa0014]
imul eax, esi, 0x120
mov ecx, dword [eax + edi + 0xc10]
mov eax, dword [ebp - 0x5c]
cmp eax, ecx
jl 0x4072b2
cmp dword [ebp - 0xb4], 0
jbe 0x4072b2
sub eax, ecx
mov ecx, edi
cdq
idiv dword [ebp - 0x90]
mov edx, eax
call fcn.0040893d
test al, al
je 0x4071c8
lea eax, [edx - 1]
cmp eax, 6
jbe 0x4071b3
test dl, 1
je 0x4071ba
mov edx, 0xff
jmp 0x4071c8
test edx, edx
jle 0x4071c8
lea eax, [edx - 6]
cdq
sub eax, edx
mov edx, eax
sar edx, 1
mov eax, dword [ebp - 0x90]
cmp eax, dword [ebp - 0x64]
je 0x4071ee
cmp dword [ebp - 0x68], 1
jle 0x4071ee
imul eax, dword [edi + 0xa0018], 0x4c
mov ecx, ebx
shr ecx, 0x10
mov ebx, dword [eax + edi + 0x288]
and ebx, ecx
imul eax, esi, 0x120
movzx eax, byte [eax + edi + 0xc0c]
cmp edx, eax
jge 0x4072b2
mov eax, dword [edi + 0x8fb5c]
lea ecx, [eax + edx*4]
imul eax, esi, 0x90
mov esi, dword [ebp - 0x5c]
add eax, edx
movzx eax, word [edi + eax*2 + 0xc20]
and eax, ebx
and dword [ecx + 0x8008], eax
cmp esi, dword [ebp - 0x74]
jge 0x4072b5
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 0x40727e
or dword [ecx], 0xf000
jmp 0x4072b2
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 - 0xa0], 0
jbe 0x407313
cmp esi, dword [ebp - 0x9c]
jl 0x407313
mov eax, dword [ebp - 0x6c]
add eax, dword [ebp - 0xb8]
cdq
idiv dword [ebp - 0x94]
mov ecx, eax
cmp ecx, dword [ebp - 0xa0]
jge 0x407313
mov eax, dword [ebp - 0x94]
cmp eax, dword [ebp - 0x64]
je 0x407306
mov eax, dword [ebp - 0x68]
cdq
idiv dword [ebp - 0x94]
mov eax, dword [ebp - 0x68]
sub eax, edx
test eax, eax
jle 0x407306
shr ebx, 8
sub eax, 1
jne 0x4072fe
mov eax, dword [edi + 0x8fb5c]
and dword [eax + ecx*4 + 0x8050], ebx
mov eax, dword [ebp - 0x6c]
inc esi
mov ebx, dword [ebp - 0xa4]
inc eax
mov ecx, dword [ebp - 0xbc]
add ebx, 2
sub dword [ebp - 0x80], 1
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0xa4], ebx
jne 0x407074
xor ebx, ebx
inc ebx
push dword [ebp - 0x60]
call fcn.0041c120
pop ecx
test eax, eax
je 0x406fa6
cmp byte [ebp - 0x55], 0
jne 0x407411
push 0x43257c
call fcn.00401036
jmp 0x407410
cmp esi, 2
je 0x407374
cmp esi, 4
jne 0x4073ac
lea eax, [ebp - 0x54]
push eax
call fcn.00417fc0
pop ecx
lea ecx, [ebx*2 + 0xb]
cmp eax, ecx
jl 0x407396
push 4
lea eax, [ebp - 0x4b]
push eax
call fcn.0040751a
jmp 0x407399
mov eax, dword [ebp - 0x7c]
cmp esi, 2
jne 0x4073a6
shl eax, 4
mov dword [ebp - 0x7c], eax
jmp 0x40733d
shl eax, 0x10
mov dword [ebp - 0x7c], eax
xor ebx, ebx
inc ebx
cmp esi, ebx
je 0x407351
jmp 0x407340
mov eax, dword [ebp - 0x54]
cmp al, 0xa
je 0x407340
cmp byte [ebp - 0x55], 0
je 0x4073d1
push str.Hex_file_header_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 0x407340
push str._n_Error_reading_hex_file._n
call fcn.00401036
cmp dword [ebp - 0x60], 0
pop ecx
je 0x407400
push dword [ebp - 0x60]
call fcn.0041ba96
pop ecx
xor al, al
jmp 0x407422
push str._n_Hex_file_not_found._n
call fcn.00401036
xor bl, bl
pop ecx
cmp dword [ebp - 0x60], 0
je 0x407420
push dword [ebp - 0x60]
call fcn.0041ba96
pop ecx
mov al, bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412976
leave
ret 8