Function at 0x407520
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0xffffffffffffffff
push 0x43e5a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x34
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esi + 0x10]
mov dword [esp + 0x4c], 0
cmp eax, 0x14
jne 0x4077fa
mov eax, dword [esi + 0xc]
cmp byte [eax + 7], 0x2d
jne 0x4077fa
cmp byte [eax + 8], 0x33
jne 0x4077fa
cmp byte [eax + 9], 0x31
jne 0x4077fa
cmp byte [eax + 0xa], 0x41
jne 0x4077fa
mov dword [0x464d7c], 0x1e
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
mov ebp, 0x64
add eax, ecx
mov dl, byte [eax - 8]
mov bl, byte [eax - 9]
mov byte [esp + 0x11], dl
movsx edi, byte [esp + 0x11]
movsx edx, bl
lea edx, [edx + edx*4]
lea edi, [edi + edx*2 - 0x210]
mov dl, byte [eax - 7]
mov al, byte [eax - 6]
mov byte [esp + 0x13], dl
mov byte [esp + 0x12], al
movsx eax, dl
lea edx, [eax + eax*4]
movsx eax, byte [esp + 0x12]
lea edx, [eax + edx*2 - 0x210]
mov eax, dword [0x45ed9c]
mov dword [esp + 0x18], edx
add eax, 0x5a
xor edx, edx
div ebp
cmp edx, edi
je 0x407666
movsx eax, byte [esp + 0x11]
push eax
movsx eax, bl
push eax
lea eax, [ecx - 7]
add ecx, 0xfffffff8
push eax
push ecx
mov ecx, dword [0x45c280]
and ecx, 0xffff
push edx
push ecx
lea edx, [esp + 0x2c]
push str.Different:__d_year_is__02d_but_barcode__d__d_digit._were__c_c
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x20
lea eax, [esp + 0x14]
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push eax
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [0x490c00]
call fcn.00439d10
lea ecx, [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffffed
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov eax, dword [0x45ed98]
mov edx, dword [esp + 0x18]
cmp eax, edx
je 0x4076e1
movsx edx, byte [esp + 0x12]
push edx
movsx edx, byte [esp + 0x17]
push edx
lea edx, [ecx - 5]
add ecx, 0xfffffffa
push edx
push ecx
push eax
lea eax, [esp + 0x28]
push str.Different:_week_is__02d_but_barcode__d__d_digit._were__c_c
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0x1c
lea edx, [esp + 0x14]
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push edx
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [0x490c00]
call fcn.00439d10
lea ecx, [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffffee
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov ecx, esi
call fcn.0040a2e0
test al, al
jne 0x407715
lea ecx, [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffffb
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
lea ecx, [esp + 0x1c]
mov edi, 5
lea eax, [eax + edx - 1]
mov dl, byte [eax]
add ecx, 4
mov byte [esp + 0x18], dl
mov edx, dword [esp + 0x18]
and edx, 0xff
sub edx, 0x30
dec eax
mov dword [ecx - 4], edx
dec edi
jne 0x407728
xor eax, eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x30], eax
push ecx
mov dword [esp + 0x38], eax
mov ecx, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
call fcn.00407d90
xor edi, edi
mov eax, 1
mov ecx, 0x45ee3c
cmp dword [ecx], 0xff
je 0x407789
add ecx, 0x48
inc eax
cmp ecx, 0x45ef14
jle 0x407773
jmp 0x4077c3
lea edx, [eax + eax*8]
xor eax, eax
lea ecx, [edx + edx + 0x29]
lea edx, [edi + ecx]
shl edx, 2
lea ecx, [edx + 0x45ed58]
mov ebp, dword [esi + 0x10]
mov ebx, eax
add ebx, ebp
mov ebp, dword [esi + 0xc]
inc eax
add ecx, 4
movsx ebx, byte [ebx + ebp - 0xc]
mov dword [ecx - 4], ebx
cmp eax, 0xb
jle 0x40779e
mov dword [edx + 0x45ed88], 0xa
add edi, 0x200
cmp edi, 0x600
jl 0x407769
lea ecx, [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
lea ecx, [esp + 0x14]
mov dword [esp + 0x4c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebp
mov eax, 0xfffffff6
mov dword fs:[0], ecx
pop ebx
add esp, 0x40
ret