Function at 0x406e15
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.0040c632
push 0x4405a8
lea eax, [ebp - 0x60]
push esi
push eax
call fcn.0041bf57
add esp, 0xc
test eax, eax
jne 0x407420
imul ecx, dword [edi + 0xc6898], 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 + 0xc6894], 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 + 0xc6894]
mov dword [ebp - 0xb4], eax
test eax, eax
je 0x406f1a
mov edx, 0x8008
mov esi, eax
imul eax, dword [edi + 0xc6898], 0x4c
mov ecx, dword [edi + 0xb63dc]
mov eax, dword [eax + edi + 0x288]
mov dword [edx + ecx], eax
lea edx, [edx + 4]
sub esi, 1
jne 0x406ef2
mov edx, dword [edi + 0xc6894]
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.00408933
test al, al
je 0x406f73
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 + 0xc6894], 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.00413810
push dword [ebp - 0x60]
call fcn.0041c140
add esp, 0x10
test eax, eax
jne 0x40742d
push dword [ebp - 0x60]
lea eax, [ebp - 0x54]
push 0x50
push eax
call fcn.0041bbfb
add esp, 0xc
test eax, eax
je 0x407402
mov eax, dword [ebp - 0x54]
cmp al, 0x3a
jne 0x4073d4
lea eax, [ebp - 0x54]
push eax
call fcn.00417fe0
pop ecx
cmp eax, 0xb
jb 0x4073d1
push 2
lea eax, [ebp - 0x53]
push eax
call fcn.00407536
mov ebx, eax
lea eax, [ebp - 0x51]
push 4
push eax
mov dword [ebp - 0x80], ebx
call fcn.00407536
add eax, dword [ebp - 0x7c]
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x4d]
push 2
push eax
call fcn.00407536
mov esi, eax
test esi, esi
jne 0x407386
lea eax, [ebp - 0x54]
push eax
call fcn.00417fe0
pop ecx
lea ecx, [ebx*2 + 0xb]
cmp eax, ecx
jl 0x407359
test ebx, ebx
jle 0x407359
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.00407536
mov ebx, eax
mov eax, dword [ebp - 0x68]
or ebx, 0xffffff00
test eax, eax
jle 0x4070c7
shl ebx, 8
or ebx, 0xff
sub eax, 1
jne 0x4070b9
cmp esi, dword [ebp - 0x74]
jge 0x4070e2
cmp esi, dword [ebp - 0x84]
jl 0x4070e2
mov eax, dword [edi + 0xb63dc]
mov ecx, dword [ebp - 0x78]
mov eax, dword [eax]
and dword [eax + ecx*4], ebx
cmp dword [ebp - 0x88], 0
jbe 0x40711c
cmp esi, dword [ebp - 0x70]
jl 0x40711c
cmp esi, dword [ebp - 0xa8]
jge 0x40711c
mov eax, dword [ebp - 0x6c]
xor edx, edx
add eax, dword [ebp - 0xac]
div dword [ebp - 0x64]
mov ecx, eax
mov eax, dword [edi + 0xb63dc]
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 0x407181
test eax, eax
je 0x407181
imul eax, dword [edi + 0xc6894], 0x120
movzx esi, word [eax + edi + 0xc04]
test si, si
je 0x407181
mov eax, dword [ebp - 0x6c]
cdq
idiv dword [ebp - 0x8c]
mov ecx, eax
cmp ecx, esi
jge 0x407181
mov eax, dword [ebp - 0x8c]
cmp eax, dword [ebp - 0x64]
je 0x407177
mov eax, dword [ebp - 0x68]
cdq
idiv dword [ebp - 0x8c]
mov eax, dword [ebp - 0x68]
sub eax, edx
test eax, eax
jle 0x407177
shr ebx, 8
sub eax, 1
jne 0x40716f
mov eax, dword [edi + 0xb63dc]
and dword [eax + ecx*4 + 8], ebx
mov esi, dword [edi + 0xc6894]
imul eax, esi, 0x120
mov ecx, dword [eax + edi + 0xc10]
mov eax, dword [ebp - 0x5c]
cmp eax, ecx
jl 0x4072ce
cmp dword [ebp - 0xb4], 0
jbe 0x4072ce
sub eax, ecx
mov ecx, edi
cdq
idiv dword [ebp - 0x90]
mov edx, eax
call fcn.00408959
test al, al
je 0x4071e4
lea eax, [edx - 1]
cmp eax, 6
jbe 0x4071cf
test dl, 1
je 0x4071d6
mov edx, 0xff
jmp 0x4071e4
test edx, edx
jle 0x4071e4
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 0x40720a
cmp dword [ebp - 0x68], 1
jle 0x40720a
imul eax, dword [edi + 0xc6898], 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 0x4072ce
mov eax, dword [edi + 0xb63dc]
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 0x4072d1
mov eax, dword [edi + 0xb63dc]
mov esi, dword [ebp - 0x78]
shl esi, 2
mov ecx, dword [eax]
imul eax, dword [edi + 0xc6894], 0x90
add eax, edx
movzx eax, word [edi + eax*2 + 0xc20]
and eax, ebx
and dword [ecx + esi], eax
mov eax, dword [edi + 0xb63dc]
mov ecx, dword [eax]
imul eax, dword [edi + 0xc6898], 0x4c
add ecx, esi
cmp dword [eax + edi + 0x288], 0xffff
jne 0x40729a
or dword [ecx], 0xf000
jmp 0x4072ce
or dword [ecx], 0xff0000
imul eax, dword [edi + 0xc6894], 0x90
add edx, eax
mov eax, dword [edi + 0xb63dc]
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 0x40732f
cmp esi, dword [ebp - 0x9c]
jl 0x40732f
mov eax, dword [ebp - 0x6c]
add eax, dword [ebp - 0xb8]
cdq
idiv dword [ebp - 0x94]
mov ecx, eax
cmp ecx, dword [ebp - 0xa0]
jge 0x40732f
mov eax, dword [ebp - 0x94]
cmp eax, dword [ebp - 0x64]
je 0x407322
mov eax, dword [ebp - 0x68]
cdq
idiv dword [ebp - 0x94]
mov eax, dword [ebp - 0x68]
sub eax, edx
test eax, eax
jle 0x407322
shr ebx, 8
sub eax, 1
jne 0x40731a
mov eax, dword [edi + 0xb63dc]
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 0x407090
xor ebx, ebx
inc ebx
push dword [ebp - 0x60]
call fcn.0041c140
pop ecx
test eax, eax
je 0x406fc2
cmp byte [ebp - 0x55], 0
jne 0x40742d
push 0x43257c
call fcn.00401036
jmp 0x40742c
cmp esi, 2
je 0x407390
cmp esi, 4
jne 0x4073c8
lea eax, [ebp - 0x54]
push eax
call fcn.00417fe0
pop ecx
lea ecx, [ebx*2 + 0xb]
cmp eax, ecx
jl 0x4073b2
push 4
lea eax, [ebp - 0x4b]
push eax
call fcn.00407536
jmp 0x4073b5
mov eax, dword [ebp - 0x7c]
cmp esi, 2
jne 0x4073c2
shl eax, 4
mov dword [ebp - 0x7c], eax
jmp 0x407359
shl eax, 0x10
mov dword [ebp - 0x7c], eax
xor ebx, ebx
inc ebx
cmp esi, ebx
je 0x40736d
jmp 0x40735c
mov eax, dword [ebp - 0x54]
cmp al, 0xa
je 0x40735c
cmp byte [ebp - 0x55], 0
je 0x4073ed
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 0x40735c
push str._n_Error_reading_hex_file._n
call fcn.00401036
cmp dword [ebp - 0x60], 0
pop ecx
je 0x40741c
push dword [ebp - 0x60]
call fcn.0041bab6
pop ecx
xor al, al
jmp 0x40743e
push str._n_Hex_file_not_found._n
call fcn.00401036
xor bl, bl
pop ecx
cmp dword [ebp - 0x60], 0
je 0x40743c
push dword [ebp - 0x60]
call fcn.0041bab6
pop ecx
mov al, bl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412996
leave
ret 8