Function at 0x4054f0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x43e458
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x10]
cmp eax, 0xa
je 0x405559
cmp eax, 0xb
je 0x405559
mov ecx, dword [esi + 0xc]
cmp byte [ecx], 0x53
je 0x405559
cmp eax, 0xe
jne 0x405924
mov ecx, esi
call fcn.00406740
cmp eax, 1
jne 0x405929
mov dword [0x464d7c], 0xe
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
xor ebp, ebp
cmp eax, 0xb
jne 0x40556d
mov edx, dword [esi + 0xc]
cmp byte [edx], 0x53
jne 0x40556d
mov ebp, 1
mov eax, dword [esi + 0xc]
add eax, ebp
mov cl, byte [eax]
cmp cl, 0x4b
jne 0x40557f
cmp byte [eax + 1], 0x52
je 0x4055d4
cmp cl, 0x47
jne 0x40558a
cmp byte [eax + 1], 0x42
je 0x4055d4
cmp cl, 0x42
jne 0x405595
cmp byte [eax + 1], 0x52
je 0x4055d4
cmp cl, 0x48
jne 0x4055a0
cmp byte [eax + 1], 0x55
je 0x4055d4
cmp cl, 0x4d
jne 0x4055b6
mov dl, byte [eax + 1]
cmp dl, 0x59
je 0x4055d4
cmp cl, cl
jne 0x4055b6
cmp dl, 0x58
je 0x4055d4
cmp cl, 0x43
jne 0x4055c1
cmp byte [eax + 1], 0x4e
je 0x4055d4
cmp cl, 0x49
jne 0x405924
cmp byte [eax + 1], 0x4e
jne 0x405924
mov cl, byte [eax + 2]
cmp cl, 0x41
jne 0x40561f
mov al, byte [eax + 3]
cmp al, cl
jl 0x4055fd
mov ecx, esi
call fcn.00405170
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
cmp al, 0x39
jg 0x40568c
mov ecx, esi
call fcn.00405300
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
cmp byte [eax + 5], 0x41
jl 0x40564c
cmp byte [eax + 6], 0x41
jl 0x40564c
lea ecx, [ebp + 7]
push 3
push ecx
mov ecx, esi
call fcn.00407d20
test al, al
je 0x405924
mov dword [0x464d7c], 0xc
jmp 0x40568c
mov al, byte [0x464d98]
test al, al
je 0x40566d
mov eax, 0xffffffe2
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
lea edx, [ebp + 5]
push 5
push edx
mov ecx, esi
call fcn.00407d20
test al, al
je 0x405924
mov dword [0x464d7c], 0xa
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esi + 0xc]
mov dword [esp + 0x48], 0
mov dl, byte [eax + ebp + 3]
mov bl, byte [eax + ebp + 4]
lea ecx, [eax + ebp]
movsx eax, dl
movsx edi, bl
lea eax, [eax + eax*4]
lea eax, [edi + eax*2 - 0x210]
mov edi, dword [0x45ed98]
cmp edi, eax
je 0x40572f
movsx ecx, bl
movsx edx, dl
push ecx
lea eax, [ebp + 5]
push edx
add ebp, 4
push eax
push ebp
push edi
lea ecx, [esp + 0x24]
push str.Different:_week_is__02d_but_barcode__d__d_digit._were__c_c
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0x1c
lea edx, [esp + 0x10]
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push edx
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [0x490c00]
call fcn.00439d10
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffffee
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, dword [0x45ed9c]
xor edx, edx
mov edi, 0xa
mov bl, byte [ecx + 2]
div edi
movsx eax, bl
sub eax, 0x30
cmp edx, eax
je 0x4057ac
movsx ecx, bl
add ebp, 3
push ecx
push ebp
push edx
lea edx, [esp + 0x1c]
push str.Different:_year_is__d_but_barcode__d_digit._was__c
push edx
call sub.MFC42.DLL_CString::Format
add esp, 0x14
lea eax, [esp + 0x10]
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push eax
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [0x490c00]
call fcn.00439d10
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffffed
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
cmp dword [0x464d7c], 0xc
jne 0x405861
mov ecx, esi
call fcn.004089a0
test al, al
jne 0x4057ed
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 0xfffffffb
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov al, byte [0x464d98]
test al, al
je 0x405835
mov ecx, dword [esi + 0x10]
push ecx
mov ecx, 0x459fa0
call fcn.0040b410
mov edi, eax
cmp edi, 1
je 0x4058a0
lea ecx, [esp + 0x10]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, edi
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov edx, dword [esi + 0xc]
mov cl, byte [edx + ebp + 6]
lea eax, [edx + ebp]
movsx ecx, cl
mov dl, byte [eax + 7]
mov bl, byte [eax + 8]
mov al, byte [eax + 9]
push ecx
movsx edx, dl
push edx
movsx ecx, bl
movsx edx, al
push ecx
push edx
mov ecx, esi
call fcn.00407c00
jmp 0x4058a0
lea edx, [esp + 0x18]
lea eax, [ecx + 9]
mov edi, 8
mov cl, byte [eax]
add edx, 4
mov byte [esp + 0x14], cl
mov ecx, dword [esp + 0x14]
and ecx, 0xff
sub ecx, 0x30
dec eax
mov dword [edx - 4], ecx
dec edi
jne 0x40586d
lea edx, [esp + 0x18]
xor eax, eax
push edx
mov ecx, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call fcn.00407d90
mov al, byte [0x464d98]
test al, al
je 0x4058e1
mov ecx, 0x459fa0
call fcn.0040bce0
cmp eax, 1
mov dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x10]
je 0x405907
call sub.MFC42.DLL_CString::CString
mov eax, 0xffffffce
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
cmp ebp, 1
jne 0x4058ee
mov eax, dword [esi + 0x10]
push ebp
dec eax
push eax
jmp 0x4058f4
mov ecx, dword [esi + 0x10]
push 0
push ecx
mov ecx, esi
call fcn.00407c50
mov dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, 0xfffffff6
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x3c
ret