Function at 0x40425c
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ecx, 0x16
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x52e]
mov esi, str.illegal_byte_sequence
push ebx
sub esp, 0x56c
mov ebx, dword [str.g._nIvi]
mov dword [ebp - 0x53a], 0x30370449
rep movsb byte es:[edi], byte [esi]
lea eax, [ebx + 0x4dffd9cd]
mov dword [0x411e18], eax
xor eax, eax
cmp word [eax + str.not_enough_memory], 0
je 0x4042bc
add eax, 2
cmp eax, 0x397a
jne 0x404297
call fcn.0040d130
add ebx, 0x5ac65876
mov dword [str.g._nIvi], ebx
mov esi, dword [str.g._nIvi]
mov edx, 0x4129d4
mov al, byte [edx]
sub eax, 0x30
cmp al, 9
ja 0x4042d3
inc edx
jmp 0x4042c7
mov eax, esi
xor esi, 0xdb4222f7
xor ebx, ebx
xor eax, 0x3ed62ee8
mov edi, esi
mov dword [0x411e18], eax
or edi, 0xd64213d9
call fcn.0040cff0
mov edx, str.tzm_Arab_MA
mov ecx, 0x23f
movzx eax, word [edx]
add edx, 2
test ax, ax
je 0x404331
add ecx, eax
cmp ecx, 0xe54
jbe 0x4042fe
mov eax, dword [0x411e18]
mov dword [esp], str.om_ET
xor eax, 0x95d6eb31
mov dword [esp + 8], eax
mov dword [esp + 4], eax
call fcn.0040cfc0
mov byte [ebp + ebx - 0x518], bl
inc ebx
mov dword [0x411e18], edi
cmp ebx, 0x100
jne 0x4042f4
xor esi, esi
xor ecx, ecx
mov al, byte [ebp + ecx - 0x518]
mov ebx, 0x15
xor edx, edx
mov byte [ebp - 0x54c], al
mov eax, ecx
div ebx
movzx eax, byte [ebp + edx - 0x52e]
movzx edx, byte [ebp - 0x54c]
add eax, edx
add eax, esi
movzx esi, al
mov al, byte [ebp + esi - 0x518]
mov byte [ebp + ecx - 0x518], al
mov al, byte [ebp - 0x54c]
inc ecx
mov byte [ebp + esi - 0x518], al
cmp ecx, 0x100
jne 0x40434b
imul eax, edi, 0x64a3e21d
xor edx, edx
xor edi, edi
xor esi, esi
mov dword [0x411e18], eax
mov eax, dword [0x411e18]
mov ebx, 0x412d40
mov dword [ebp - 0x54c], eax
or eax, 0xffde4a48
mov dword [ebp - 0x550], eax
mov dword [str.g._nIvi], eax
lea eax, [esi + 1]
movzx esi, al
mov al, byte [ebp + esi - 0x518]
lea ecx, [eax + edi]
movzx edi, cl
mov cl, byte [ebp + edi - 0x518]
mov byte [ebp + esi - 0x518], cl
mov byte [ebp + edi - 0x518], al
mov cl, byte [ebx]
sub ecx, 0x30
cmp cl, 9
ja 0x404403
inc ebx
jmp 0x4043f6
imul ebx, dword [ebp - 0x550], 0x4cc822e0
mov dword [ebp - 0x558], edx
mov byte [ebp - 0x554], al
mov dword [0x411e18], ebx
call fcn.0040cc08
mov edx, dword [ebp - 0x558]
mov al, byte [ebp - 0x554]
add al, byte [ebp + esi - 0x518]
movzx eax, al
mov al, byte [ebp + eax - 0x518]
xor al, byte [ebp + edx - 0x53a]
movzx eax, al
mov word [ebp + edx*2 - 0x536], ax
inc edx
cmp edx, 4
jne 0x4043ae
mov eax, dword [ebp - 0x54c]
and ebx, 0x11c953f6
xor edi, edi
xor esi, esi
mov dword [esp + 4], ebx
or eax, 0xffdfde7f
mov dword [esp], 0x412ce0
mov dword [esp + 8], eax
call fcn.0040cfc0
mov word [ebp - 0x52e], 0
call fcn.0040d130
lea eax, [ebx - 0x71bf8c91]
add ebx, 0x4f3c4903
mov dword [esp + 0xc], str.not_enough_memory
xor ebx, 0x827f7415
xor eax, 0x6da34165
mov dword [esp + 8], str.not_enough_memory
and ebx, 0xc955ef49
mov dword [esp + 4], eax
or ebx, 0xf9653e41
mov dword [esp], 0x4124a0
add ebx, 0x1d50fc66
imul ebx, ebx, 0x2bdeb906
call fcn.0040eb38
call fcn.0040d130
mov dword [str.g._nIvi], ebx
add ebx, 0x28914031
call fcn.0040cff0
xor eax, eax
mov ecx, 0x100
mov dword [ebp - 0x540], edi
cmp byte [0x4129d4], 0
lea edi, [ebp - 0x418]
mov dword [ebp - 0x544], esi
rep stosd dword es:[edi], eax
mov dword [0x411e18], ebx
je 0x404534
call fcn.0040d130
mov eax, ebx
xor eax, 0x8b82758b
mov dword [str.g._nIvi], eax
mov dword [esp + 4], ebx
mov ebx, 0x8c0
mov dword [esp + 0xc], str.lt_LT
mov dword [esp + 8], str.lt_LT
mov dword [esp], 0x4124a0
call fcn.0040eb38
mov ecx, str.not_enough_memory
imul eax, dword [str.g._nIvi], 0xa1ce9f36
mov dword [0x411e18], eax
xor eax, 0x5d208c7a
mov dword [str.g._nIvi], eax
movzx edx, word [ecx]
add ecx, 2
test dx, dx
je 0x404596
add ebx, edx
cmp ebx, 0x9d5
jbe 0x404577
add eax, 0x1a66b243
mov dword [0x411e18], eax
mov eax, dword [0x410be8]
or dword [0x411e18], 0x5faeff76
cmp dword [eax + 0x178], 0
jne 0x4045b8
xor ebx, ebx
mov dword [esp], ebx
call fcn.00401a00
mov ebx, dword [0x410be8]
cmp dword [ebx + 4], 0
je 0x4045fe
mov eax, dword [0x410be8]
xor ecx, ecx
mov edx, dword [eax + 0x178]
mov dword [esp + 0xc], ecx
movzx ecx, word [edx + 4]
mov dword [esp + 8], ecx
mov edx, dword [edx]
mov dword [esp + 4], edx
mov edx, dword [eax + 4]
mov dword [esp], edx
call dword [eax + 0x104]
mov dword [ebp - 0x54c], eax
sub esp, 0x10
test eax, eax
jne 0x40465d
jmp 0x40464c
mov eax, dword [str.g._nIvi]
xor edi, edi
and eax, 0xd8388b8f
xor eax, 0x83416028
mov dword [str.g._nIvi], eax
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], edi
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x194]
mov dword [esp], eax
call dword [ebx + 0x100]
mov dword [ebx + 4], eax
mov eax, dword [0x410be8]
sub esp, 0x14
cmp dword [eax + 4], 0
jne 0x4045c4
xor esi, esi
xor edi, edi
xor ebx, ebx
mov dword [ebp - 0x54c], esi
jmp 0x404a1e
mov eax, dword [0x410be8]
xor edx, edx
xor ebx, ebx
mov esi, dword [eax + 0x198]
mov eax, dword [0x411e18]
cmp dword [esi + ebx*4], 0
je 0x404681
xor eax, 0x266c9e52
inc ebx
mov dl, 1
jmp 0x404671
test dl, dl
je 0x40468a
mov dword [0x411e18], eax
call fcn.0040a1a0
xor edx, edx
div ebx
mov eax, dword [0x410be8]
mov ecx, dword [eax + 0x178]
cmp dword [ecx + 8], 0
mov edx, dword [esi + edx*4]
mov dword [ebp - 0x544], 0x100
je 0x4046bb
mov dword [ebp - 0x544], 0x800100
mov ecx, dword [ebp - 0x544]
mov dword [esp + 8], edx
lea edx, [ebp - 0x536]
xor edi, edi
mov dword [esp + 4], edx
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x54c]
mov dword [esp], ecx
call dword [eax + 0x108]
sub esp, 0x1c
mov ebx, eax
test eax, eax
je 0x404a1e
mov eax, dword [0x410be8]
mov edx, dword [eax + 0x178]
cmp dword [edx + 8], 0
je 0x40474a
mov dword [ebp - 0x544], 0x3300
lea edx, [ebp - 0x544]
xor dword [str.g._nIvi], 0xeff374ba
mov dword [esp + 0xc], 4
mov dword [esp + 8], edx
mov dword [esp + 4], 0x1f
mov dword [esp], ebx
call dword [eax + 0x10c]
sub esp, 0x10
xor edi, edi
mov eax, dword [0x410be8]
and dword [str.g._nIvi], 0xa03a5f49
mov edx, dword [eax + 0x19c]
mov esi, dword [edx + edi]
test esi, esi
je 0x4047c7
mov dword [esp + 0xc], 0x20000000
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [eax + 0x110]
xor eax, eax
sub esp, 0x10
cmp byte [eax + 0x4129d4], 0
je 0x40479d
inc eax
cmp eax, 0xad1
jne 0x40478a
jmp 0x4047a4
cmp eax, 0x83
jle 0x4047a9
call fcn.0040cff0
mov eax, dword [0x411e18]
add edi, 4
sub eax, 0x1b7fedae
mov dword [str.g._nIvi], eax
and eax, 0x9c6424f7
mov dword [0x411e18], eax
jmp 0x40474c
mov edi, dword [ebp + 8]
xor ecx, ecx
mov edx, dword [edi + 4]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], edx
mov edx, dword [edi]
xor edi, edi
mov dword [esp + 8], edi
mov dword [esp + 4], edi
mov dword [esp + 0xc], edx
mov dword [esp], ebx
call dword [eax + 0x114]
sub esp, 0x1c
mov edi, eax
test eax, eax
je 0x404a1e
xor edi, edi
mov dword [esp], ebx
mov dword [esp + 4], edi
mov eax, dword [0x410be8]
call dword [eax + 0x118]
push edx
push edx
test eax, eax
je 0x4048b1
xor eax, eax
cmp word [eax + eax + str.file_exists], 0
je 0x404845
inc eax
cmp eax, 0x1ff6
jne 0x404821
call fcn.0040d130
sub dword [str.g._nIvi], 0x329dbc43
jmp 0x40484c
cmp eax, 0xc63
jle 0x404867
mov eax, dword [str.g._nIvi]
mov dword [esp], str.om_ET
mov dword [esp + 8], eax
mov dword [esp + 4], eax
call fcn.0040cfc0
jmp 0x404876
mov eax, dword [0x411e18]
and eax, 0x918fe6c5
mov dword [str.g._nIvi], eax
mov eax, dword [str.g._nIvi]
imul edx, eax, 0x6809bfe0
imul eax, eax, 0x139c3d4c
mov dword [str.g._nIvi], edx
xor eax, 0xdadeeeb4
mov dword [0x411e18], eax
call fcn.0040cc08
mov dword [esp], ebx
call fcn.004041b0
cmp dword [ebp + 0xc], 0
je 0x4048b1
cmp eax, 0xc8
je 0x4048b8
xor edi, edi
jmp 0x404a1e
mov eax, dword [0x411e18]
xor edi, edi
sub eax, 0x4830e160
mov dword [str.g._nIvi], eax
lea eax, [ebp - 0x540]
mov dword [esp + 8], 0x400
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x418]
mov dword [esp + 4], eax
mov dword [esp], ebx
mov eax, dword [0x410be8]
call dword [eax + 0x11c]
mov dword [ebp - 0x550], eax
sub esp, 0x10
test eax, eax
je 0x404a11
mov eax, dword [ebp - 0x540]
mov ecx, dword [0x410be8]
test eax, eax
je 0x404a11
test esi, esi
jne 0x40492e
mov dword [esp + 4], eax
mov dword [esp], 0x40
call dword [ecx + 0x50]
push esi
push esi
jmp 0x404945
add eax, edi
mov dword [esp + 8], 0x42
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [ecx + 0x54]
sub esp, 0xc
sub dword [0x411e18], 0x2c881731
mov esi, eax
mov eax, dword [ebp - 0x540]
lea edx, [esi + edi]
lea ecx, [eax + edi]
mov dword [ebp - 0x554], ecx
mov dword [esp + 8], eax
lea eax, [ebp - 0x418]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.004056e0
xor eax, eax
cmp word [eax + eax + str.function_not_supported], 0
je 0x4049a4
inc eax
cmp eax, 0x1065
jne 0x40497b
call fcn.0040cc08
mov eax, dword [str.g._nIvi]
or eax, 0xe2b3da0d
mov dword [0x411e18], eax
jmp 0x4049b1
mov edx, dword [0x411e18]
cmp eax, 0xa54
jle 0x4049c7
call fcn.0040d130
mov eax, dword [0x411e18]
sub eax, 0x7a315805
mov dword [str.g._nIvi], eax
jmp 0x4049d3
mov eax, edx
or eax, 0x64e22dc7
mov dword [0x411e18], eax
or dword [str.g._nIvi], 0x2bf05262
call fcn.0040cff0
xor ecx, ecx
lea eax, [ebp - 0x418]
mov dword [esp + 8], 0x400
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0040574c
cmp dword [ebp - 0x550], 1
mov edi, dword [ebp - 0x554]
je 0x4048c9
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
mov dword [eax + 4], edi
mov edi, 1
mov eax, dword [0x410be8]
mov edx, dword [eax + 4]
test edx, edx
je 0x404a3e
mov dword [esp], edx
call dword [eax + 0x120]
xor edx, edx
push esi
mov eax, dword [0x410be8]
mov dword [eax + 4], edx
cmp dword [ebp - 0x54c], 0
je 0x404a5c
mov eax, dword [ebp - 0x54c]
mov dword [esp], eax
mov eax, dword [0x410be8]
call dword [eax + 0x120]
push ecx
xor eax, eax
test ebx, ebx
je 0x404ad2
cmp word [eax + str.tzm_Arab_MA], 0
je 0x404aa8
add eax, 2
cmp eax, 0x30aa
jne 0x404a62
mov esi, dword [str.g._nIvi]
mov dword [esp + 0xc], str.file_exists
mov dword [esp + 8], str.not_enough_memory
mov dword [esp + 4], esi
xor esi, 0xb82ba3d
mov dword [esp], 0x412ce0
call fcn.0040eb38
mov dword [0x411e18], esi
mov eax, dword [0x411e18]
lea edx, [eax - 0x35157e20]
sub eax, 0x39bc1b15
mov dword [str.g._nIvi], edx
mov dword [0x411e18], eax
mov dword [esp], ebx
mov eax, dword [0x410be8]
call dword [eax + 0x120]
push edx
mov ebx, dword [0x410be8]
test edi, edi
jne 0x404b52
xor edx, edx
cmp byte [edx + 0x4124a0], 0
je 0x404b01
inc edx
cmp edx, 0xbd8
jne 0x404ade
call fcn.0040cc08
and dword [0x411e18], 0x3a9b9b57
jmp 0x404b13
mov eax, dword [0x411e18]
and eax, 0xe5504bbb
cmp edx, 0x4c4
jle 0x404b1d
mov eax, dword [0x411e18]
and eax, 0x99eb1fbb
imul eax, eax, 0x6835cf97
mov dword [str.g._nIvi], eax
mov eax, dword [ebx + 0x178]
mov dword [esp], eax
call fcn.00404128
mov dword [ebx + 0x184], 1
mov dword [ebx + 0x178], eax
mov dword [ebx + 0x188], 2
jmp 0x404b69
mov eax, dword [str.g._nIvi]
xor eax, 0x4e14649c
mov dword [0x411e18], eax
xor eax, eax
mov dword [ebx + 0x184], eax
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret