Function at 0x404d30
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x43d5c8
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 0x404d99
cmp eax, 0xb
je 0x404d99
mov ecx, dword [esi + 0xc]
cmp byte [ecx], 0x53
je 0x404d99
cmp eax, 0xe
jne 0x405164
mov ecx, esi
call fcn.00405f80
cmp eax, 1
jne 0x405169
mov dword [0x463b44], 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 0x404dad
mov edx, dword [esi + 0xc]
cmp byte [edx], 0x53
jne 0x404dad
mov ebp, 1
mov eax, dword [esi + 0xc]
add eax, ebp
mov cl, byte [eax]
cmp cl, 0x4b
jne 0x404dbf
cmp byte [eax + 1], 0x52
je 0x404e14
cmp cl, 0x47
jne 0x404dca
cmp byte [eax + 1], 0x42
je 0x404e14
cmp cl, 0x42
jne 0x404dd5
cmp byte [eax + 1], 0x52
je 0x404e14
cmp cl, 0x48
jne 0x404de0
cmp byte [eax + 1], 0x55
je 0x404e14
cmp cl, 0x4d
jne 0x404df6
mov dl, byte [eax + 1]
cmp dl, 0x59
je 0x404e14
cmp cl, cl
jne 0x404df6
cmp dl, 0x58
je 0x404e14
cmp cl, 0x43
jne 0x404e01
cmp byte [eax + 1], 0x4e
je 0x404e14
cmp cl, 0x49
jne 0x405164
cmp byte [eax + 1], 0x4e
jne 0x405164
mov cl, byte [eax + 2]
cmp cl, 0x41
jne 0x404e5f
mov al, byte [eax + 3]
cmp al, cl
jl 0x404e3d
mov ecx, esi
call fcn.004049b0
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 0x404ecc
mov ecx, esi
call fcn.00404b40
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 0x404e8c
cmp byte [eax + 6], 0x41
jl 0x404e8c
lea ecx, [ebp + 7]
push 3
push ecx
mov ecx, esi
call fcn.00407560
test al, al
je 0x405164
mov dword [0x463b44], 0xc
jmp 0x404ecc
mov al, byte [0x463b60]
test al, al
je 0x404ead
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.00407560
test al, al
je 0x405164
mov dword [0x463b44], 0xa
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_4
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 [0x45db60]
cmp edi, eax
je 0x404f6f
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 [0x48f9c8]
call fcn.00439080
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 [0x45db64]
xor edx, edx
mov edi, 0xa
mov bl, byte [ecx + 2]
div edi
movsx eax, bl
sub eax, 0x30
cmp edx, eax
je 0x404fec
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 [0x48f9c8]
call fcn.00439080
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 [0x463b44], 0xc
jne 0x4050a1
mov ecx, esi
call fcn.004081d0
test al, al
jne 0x40502d
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 [0x463b60]
test al, al
je 0x405075
mov ecx, dword [esi + 0x10]
push ecx
mov ecx, 0x458d68
call fcn.0040ac40
mov edi, eax
cmp edi, 1
je 0x4050e0
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.00407440
jmp 0x4050e0
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 0x4050ad
lea edx, [esp + 0x18]
xor eax, eax
push edx
mov ecx, esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call fcn.004075d0
mov al, byte [0x463b60]
test al, al
je 0x405121
mov ecx, 0x458d68
call fcn.0040b510
cmp eax, 1
mov dword [esp + 0x48], 0xffffffff
lea ecx, [esp + 0x10]
je 0x405147
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 0x40512e
mov eax, dword [esi + 0x10]
push ebp
dec eax
push eax
jmp 0x405134
mov ecx, dword [esi + 0x10]
push 0
push ecx
mov ecx, esi
call fcn.00407490
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