Function at 0x405cb0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push 0xffffffffffffffff
push 0x43d668
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_4
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x4c], 0
cmp ecx, 0x12
mov dword [esp + 0x18], ecx
jne 0x405cf6
mov eax, dword [esi + 0xc]
add eax, ecx
cmp byte [eax - 0xb], 0x2d
je 0x405d0e
cmp ecx, 0x13
jne 0x405f51
mov eax, dword [esi + 0xc]
add eax, ecx
cmp byte [eax - 0xb], 0x2d
jne 0x405f51
mov bl, byte [eax - 8]
mov dl, byte [eax - 7]
movsx ecx, bl
mov byte [esp + 0x13], dl
mov ebp, 0xa
movsx edx, dl
lea ecx, [ecx + ecx*4]
lea edi, [edx + ecx*2 - 0x210]
mov cl, byte [eax - 9]
mov eax, dword [0x45db64]
xor edx, edx
div ebp
movsx eax, cl
sub eax, 0x30
cmp edx, eax
je 0x405da9
mov eax, dword [esp + 0x18]
movsx ecx, cl
add eax, 0xfffffff8
push ecx
push eax
push edx
lea ecx, [esp + 0x20]
push str.Different:_year_is__d_but_barcode__d_digit._was__c
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x14
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 [0x48f9c8]
call fcn.00439080
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 [0x45db60]
cmp eax, edi
je 0x405e22
movsx ecx, byte [esp + 0x13]
movsx edx, bl
push ecx
mov ecx, dword [esp + 0x1c]
push edx
lea edx, [ecx - 6]
add ecx, 0xfffffff9
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 [0x48f9c8]
call fcn.00439080
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
mov dword [0x463b44], 0x16
call fcn.00409950
test al, al
jne 0x405e60
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, 6
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 0x405e73
xor eax, eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], eax
push ecx
mov dword [esp + 0x3c], eax
mov ecx, esi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
call fcn.004075d0
xor edi, edi
mov eax, 1
mov ecx, 0x45dc04
cmp dword [ecx], 0xff
je 0x405ed0
add ecx, 0x48
inc eax
cmp ecx, 0x45dcdc
jle 0x405eba
jmp 0x405f1a
lea edx, [eax + eax*8]
xor eax, eax
lea ecx, [edx + edx - 0x12]
lea edx, [edi + ecx]
shl edx, 2
lea ecx, [edx + 0x45dc0c]
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 - 0xa]
mov dword [ecx - 4], ebx
cmp eax, 0xa
jl 0x405ee5
lea eax, [edx + 0x45dc38]
mov ecx, 0x20
mov dword [edx + 0x45dc34], 0xa
mov dword [eax], ecx
mov dword [eax + 4], ecx
add edi, 0x200
cmp edi, 0x600
jl 0x405eb0
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
mov ecx, esi
call fcn.00406d60
lea ecx, [esp + 0x14]
mov esi, eax
mov dword [esp + 0x4c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x44]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x40
ret