Function at 0x41dc40
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x69c
xor eax, eax
push ebx
mov dword [esp + 0x5c], eax
push ebp
push esi
mov dword [esp + 0x68], eax
push edi
mov dword [esp + 0x70], eax
mov ecx, 0x20
lea edi, [esp + 0x22c]
rep stosd dword es:[edi], eax
mov ecx, 0x20
lea edi, [esp + 0x1ac]
rep stosd dword es:[edi], eax
xor ecx, ecx
lea edi, [esp + 0x12c]
mov dword [esp + 0x58], ecx
mov dword [esp + 0x74], eax
mov dword [esp + 0x5c], ecx
lea edx, [esp + 0x58]
mov dword [esp + 0x60], ecx
push edx
mov dword [esp + 0x68], ecx
mov ecx, 0x20
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x6b4]
lea eax, [esp + 0x1b0]
lea ecx, [esp + 0x230]
push eax
lea edx, [esp + 0x70]
push ecx
xor esi, esi
push edx
push edi
mov dword [esp + 0x60], esi
mov dword [esp + 0x68], esi
call fcn.0042afa0
push 1
lea eax, [esp + 0x70]
push str..LST
push eax
call fcn.0042b1a0
add esp, 0x20
test eax, eax
je 0x41dde0
lea edi, [esp + 0x1ac]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 2
jl 0x41ddb0
mov dl, byte [esp + ecx + 0x1ab]
lea edi, [esp + ecx + 0x1ac]
mov byte [esp + 0x12e], al
lea eax, [esp + 0x12c]
mov cl, byte [edi - 2]
push eax
mov byte [esp + 0x130], cl
mov byte [esp + 0x131], dl
call fcn.0050a057
lea ecx, [esp + 0x5c]
mov ebp, eax
lea edx, [esp + 0x1b0]
push ecx
lea eax, [esp + 0x234]
push edx
lea ecx, [esp + 0x74]
push eax
lea edx, [esp + 0x13c]
push ecx
push edx
mov byte [edi - 2], 0
call fcn.0042b0b0
lea eax, [esp + 0x144]
push 0x5c4598
push eax
call fcn.005099ce
mov ebx, eax
push esi
push 4
push ebx
mov dword [esp + 0x6c], ebx
call fcn.0050b283
push ebx
push 1
lea ecx, [esp + 0x88]
push 4
push ecx
call fcn.0050b0c8
mov eax, dword [esp + 0x90]
lea edx, [ebp + 1]
add esp, 0x3c
cmp eax, edx
jae 0x41ddbd
cmp ebx, esi
je 0x41ddb0
push ebx
call fcn.0050ae47
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x69c
ret
lea eax, [ebp*4 + 8]
push esi
push eax
push ebx
call fcn.0050b283
push ebx
push 1
lea ecx, [esp + 0x60]
push 4
push ecx
call fcn.0050b0c8
add esp, 0x1c
jmp 0x41ddf8
push 0x5c4598
push edi
mov dword [esp + 0x54], esi
call fcn.005099ce
mov ebx, eax
add esp, 8
mov dword [esp + 0x40], ebx
push 1
lea edx, [esp + 0x5c]
push str..LST
push edx
call fcn.0042b1a0
add esp, 0xc
test eax, eax
je 0x41deb8
mov ecx, dword [esp + 0x4c]
xor eax, eax
mov dword [esp + 0xc0], eax
push esi
mov dword [esp + 0xc8], eax
push ecx
push ebx
mov word [esp + 0xd4], ax
call fcn.0050b283
push ebx
push 4
lea edx, [esp + 0xd4]
push 1
push edx
call fcn.0050b0c8
mov al, byte [esp + 0xdc]
add esp, 0x1c
cmp al, 0x42
jne 0x41de6f
cmp byte [esp + 0xc1], 0x4d
jne 0x41de6f
mov eax, dword [str..BMP]
mov cl, byte [0x5c4924]
jmp 0x41de99
lea edx, [esp + 0xc0]
push 1
push edx
push 0x5c491c
call fcn.0042b1a0
add esp, 0xc
test eax, eax
je 0x41ddb0
mov eax, dword [str..LBT]
mov cl, byte [0x5c4918]
mov edx, dword [esp + 0x4c]
push esi
push edx
push ebx
mov dword [esp + 0xcc], eax
mov byte [esp + 0xd0], cl
call fcn.0050b283
add esp, 0xc
jmp 0x41deca
xor eax, eax
mov cl, byte [esp + eax + 0x58]
mov byte [esp + eax + 0xc0], cl
inc eax
test cl, cl
jne 0x41deba
push 1
lea eax, [esp + 0xc4]
push str..bmp
push eax
call fcn.0042b1a0
add esp, 0xc
test eax, eax
je 0x41e070
push ebx
push 1
lea ecx, [esp + 0xa8]
push 2
push ecx
call fcn.0050b0c8
push ebx
push 1
lea edx, [esp + 0xbc]
push 4
push edx
call fcn.0050b0c8
push ebx
push 1
lea eax, [esp + 0xd0]
push 2
push eax
call fcn.0050b0c8
push ebx
push 1
lea ecx, [esp + 0xe2]
push 2
push ecx
call fcn.0050b0c8
add esp, 0x40
lea edx, [esp + 0xac]
push ebx
push 1
push 4
push edx
call fcn.0050b0c8
push ebx
push 1
lea eax, [esp + 0x90]
push 4
push eax
call fcn.0050b0c8
push ebx
push 1
lea ecx, [esp + 0xa4]
push 4
push ecx
call fcn.0050b0c8
push ebx
push 1
lea edx, [esp + 0xb8]
push 4
push edx
call fcn.0050b0c8
add esp, 0x40
lea eax, [esp + 0x84]
push ebx
push 1
push 2
push eax
call fcn.0050b0c8
push ebx
push 1
lea ecx, [esp + 0x9e]
push 2
push ecx
call fcn.0050b0c8
push ebx
push 1
lea edx, [esp + 0xb0]
push 4
push edx
call fcn.0050b0c8
push ebx
push 1
lea eax, [esp + 0xc4]
push 4
push eax
call fcn.0050b0c8
add esp, 0x40
lea ecx, [esp + 0x90]
push ebx
push 1
push 4
push ecx
call fcn.0050b0c8
push ebx
push 1
lea edx, [esp + 0xac]
push 4
push edx
call fcn.0050b0c8
push ebx
push 1
lea eax, [esp + 0xc0]
push 4
push eax
call fcn.0050b0c8
push ebx
push 1
lea ecx, [esp + 0xd4]
push 4
push ecx
call fcn.0050b0c8
add esp, 0x40
push 0x68
call fcn.0050a4f5
mov edx, dword [esp + 0x80]
mov ebp, eax
add esp, 4
mov dword [esp + 0x1c], ebp
mov dword [ebp + 0x20], edx
mov eax, dword [esp + 0x80]
mov dword [ebp + 0x24], eax
mov ecx, dword [esp + 0x86]
cmp cx, 8
jbe 0x41e04e
mov dword [ebp + 0x28], esi
jmp 0x41e1c2
mov eax, dword [esp + 0x98]
cmp eax, esi
je 0x41e061
mov dword [ebp + 0x28], eax
jmp 0x41e1c2
mov edx, 1
shl edx, cl
mov dword [ebp + 0x28], edx
jmp 0x41e1c2
push 1
lea eax, [esp + 0xc4]
push str..lbt
push eax
call fcn.0042b1a0
add esp, 0xc
test eax, eax
je 0x41e0e1
push ebx
push 1
lea ecx, [esp + 0xb8]
push 0x10
push ecx
call fcn.0050b0c8
push 0x68
call fcn.0050a4f5
mov edx, dword [esp + 0xc8]
mov ebp, eax
add esp, 0x14
mov dword [esp + 0x1c], ebp
mov dword [ebp + 0x20], edx
mov eax, dword [esp + 0xb8]
mov dword [ebp + 0x24], eax
mov eax, dword [esp + 0xbc]
cmp eax, 0x18
jne 0x41e0d5
mov dword [ebp + 0x28], esi
jmp 0x41e1c2
mov dword [ebp + 0x28], 0x100
jmp 0x41e1c2
push 1
lea ecx, [esp + 0xc4]
push str..LBM
push ecx
call fcn.0042b1a0
add esp, 0xc
test eax, eax
je 0x41ddb0
push ebx
push 1
lea edx, [esp + 0x108]
push 0x1c
push edx
call fcn.0050b0c8
mov eax, dword [esp + 0x124]
lea ecx, [eax*8]
push ecx
call fcn.0050a4f5
mov edx, dword [esp + 0x128]
mov esi, eax
push ebx
lea eax, [edx + edx]
push eax
push 4
push esi
call fcn.0050b0c8
push ebx
push 1
lea ecx, [esp + 0x148]
push 0xe
push ecx
call fcn.0050b0c8
mov edx, dword [esp + 0x15a]
mov eax, dword [esp + 0x14c]
add esp, 0x34
test eax, eax
lea ebp, [edx - 0xe]
je 0x41e16c
sub ebp, 0x400
push ebp
call fcn.0050a4f5
push ebx
mov edi, eax
push ebp
push 1
push edi
call fcn.0050b0c8
push 0x68
call fcn.0050a4f5
mov ebp, eax
mov eax, dword [edi + 4]
add esp, 0x18
mov dword [esp + 0x1c], ebp
mov dword [ebp + 0x20], eax
mov ecx, dword [edi + 8]
mov dword [ebp + 0x24], ecx
cmp word [edi + 0xe], 8
jne 0x41e1aa
mov dword [ebp + 0x28], 0x100
jmp 0x41e1b1
mov dword [ebp + 0x28], 0
push esi
call fcn.0050a62f
push edi
call fcn.0050a62f
add esp, 8
xor esi, esi
cmp dword [ebp + 0x28], esi
jne 0x41e1e3
push ebp
call fcn.0050a62f
push ebx
call fcn.0050ae47
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x69c
ret
cmp dword [esp + 0x6b4], esi
je 0x41e222
mov edx, dword [esp + 0x6c0]
mov ecx, dword [esp + 0x6bc]
mov eax, dword [esp + 0x6b8]
push edx
push ecx
push eax
mov dword [ebp + 0x2c], 1
mov byte [ebp + 0x30], al
mov byte [ebp + 0x31], cl
mov byte [ebp + 0x32], dl
call fcn.0040e470
add esp, 0xc
mov dword [esp + 0x50], eax
jmp 0x41e229
mov dword [ebp + 0x2c], 0xffffffff
mov ecx, dword [ebp + 0x20]
mov dword [ebp + 0x64], esi
cmp ecx, 0x100
mov dword [esp + 0x24], ecx
jge 0x41e26e
mov eax, 0x100
cdq
fldln2
idiv ecx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fyl2x
fldln2
fld qword [0x5a8468]
fyl2x
fdivp st(1)
fadd qword [0x5a8460]
call fcn.0050a970
add eax, 8
mov dword [ebp + 0x48], eax
jmp 0x41e275
mov dword [ebp + 0x48], 8
mov ecx, dword [ebp + 0x24]
cmp ecx, 0x100
jge 0x41e2b3
mov eax, 0x100
cdq
fldln2
idiv ecx
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fyl2x
fldln2
fld qword [0x5a8468]
fyl2x
fdivp st(1)
fadd qword [0x5a8460]
call fcn.0050a970
add eax, 0x18
mov dword [ebp + 0x4c], eax
jmp 0x41e2ba
mov dword [ebp + 0x4c], 0x18
fldln2
fild dword [esp + 0x24]
fyl2x
fldln2
fld qword [0x5a8468]
fyl2x
fdivp st(1)
fadd qword [0x5a8460]
call fcn.0050a970
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x5c], esi
mov dword [ebp + 0x60], esi
mov eax, dword [0x7f1684]
cmp eax, 1
mov ecx, 3
jne 0x41e314
mov edi, 0xb
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], 2
mov dword [esp + 0x2c], 5
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], ecx
jmp 0x41e376
cmp eax, 2
jne 0x41e325
mov dword [esp + 0x24], 0xb
xor edi, edi
jmp 0x41e2fa
cmp eax, ecx
jne 0x41e338
mov edi, 0xa
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], ecx
jmp 0x41e302
cmp eax, 4
jne 0x41e34d
mov dword [esp + 0x24], 0xa
xor edi, edi
mov dword [esp + 0x20], ecx
jmp 0x41e302
cmp eax, 5
jne 0x41e372
mov eax, 4
mov edi, 8
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x38], eax
jmp 0x41e376
mov edi, dword [esp + 0x50]
mov edx, dword [ebp + 0x28]
shl edx, 5
push edx
call fcn.0050a4f5
mov dword [ebp + 0x54], eax
mov esi, eax
mov eax, dword [0x7f1684]
add esp, 4
cmp eax, 5
mov eax, dword [ebp + 0x28]
mov dword [esp + 0x18], 0
jne 0x41e507
test eax, eax
jle 0x41e665
push ebx
push 1
lea eax, [esp + 0x44]
push 1
push eax
call fcn.0050b0c8
push ebx
push 1
lea ecx, [esp + 0x5c]
push 1
push ecx
call fcn.0050b0c8
push ebx
push 1
lea edx, [esp + 0x70]
push 1
push edx
call fcn.0050b0c8
push ebx
push 1
lea eax, [esp + 0x6f]
push 1
push eax
call fcn.0050b0c8
add esp, 0x40
mov dword [esp + 0x30], 0
fild dword [esp + 0x30]
mov ecx, dword [esp + 0x48]
and ecx, 0xff
fmul dword [0x5a845c]
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fmul st(1)
call fcn.0050a970
mov edx, dword [esp + 0x44]
mov cl, byte [esp + 0x28]
and edx, 0xff
shr al, cl
mov dword [esp + 0x14], edx
mov ecx, edi
fild dword [esp + 0x14]
movzx bp, al
fmul st(1)
shl ebp, cl
call fcn.0050a970
mov cl, byte [esp + 0x20]
shr al, cl
mov ecx, dword [esp + 0x2c]
movzx ax, al
shl eax, cl
mov ecx, dword [esp + 0x3c]
and ecx, 0xff
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
add ebp, eax
fmul st(1)
call fcn.0050a970
mov bl, byte [esp + 0x38]
mov edx, dword [esp + 0x24]
mov cl, bl
add esi, 2
shr al, cl
mov ecx, edx
fstp st(0)
movzx ax, al
shl eax, cl
add ebp, eax
mov eax, dword [esp + 0x30]
mov word [esi - 2], bp
inc eax
cmp eax, 0xf
mov dword [esp + 0x30], eax
jl 0x41e3f2
mov al, byte [esp + 0x48]
mov cl, byte [esp + 0x28]
shr al, cl
mov ecx, edi
mov dword [esp + 0x14], edx
add esi, 2
movzx ax, al
shl eax, cl
mov cl, byte [esp + 0x44]
mov dl, cl
mov cl, byte [esp + 0x20]
shr dl, cl
mov ecx, dword [esp + 0x2c]
movzx bp, dl
shl ebp, cl
mov cl, byte [esp + 0x3c]
mov dl, cl
mov cl, bl
xor bx, bx
shr dl, cl
add eax, ebp
mov ebp, dword [esp + 0x1c]
mov bl, dl
mov edx, dword [esp + 0x14]
mov ecx, edx
shl ebx, cl
add eax, ebx
mov ebx, dword [esp + 0x40]
mov word [esi - 2], ax
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x28]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x41e3ab
jmp 0x41e665
test eax, eax
jle 0x41e665
push ebx
push 1
lea ecx, [esp + 0x44]
push 1
push ecx
call fcn.0050b0c8
push ebx
push 1
lea edx, [esp + 0x5c]
push 1
push edx
call fcn.0050b0c8
push ebx
push 1
lea eax, [esp + 0x70]
push 1
push eax
call fcn.0050b0c8
push ebx
push 1
lea ecx, [esp + 0x6f]
push 1
push ecx
call fcn.0050b0c8
add esp, 0x40
mov dword [esp + 0x30], 0
fild dword [esp + 0x30]
mov edx, dword [esp + 0x48]
and edx, 0xff
fmul dword [0x5a845c]
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
fmul st(1)
call fcn.0050a970
mov cl, byte [esp + 0x28]
shr al, cl
mov ecx, edi
movzx bp, al
mov eax, dword [esp + 0x44]
and eax, 0xff
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
shl ebp, cl
fmul st(1)
call fcn.0050a970
mov cl, byte [esp + 0x20]
xor dx, dx
shr al, cl
mov ecx, dword [esp + 0x2c]
mov dl, al
mov eax, dword [esp + 0x3c]
and eax, 0xff
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
shl edx, cl
fmul st(1)
add ebp, edx
call fcn.0050a970
mov bl, byte [esp + 0x38]
mov edx, dword [esp + 0x24]
mov cl, bl
add esi, 2
shr al, cl
mov ecx, edx
fstp st(0)
movzx ax, al
shl eax, cl
add ebp, eax
mov eax, dword [esp + 0x30]
mov word [esi - 2], bp
inc eax
cmp eax, 0xf
mov dword [esp + 0x30], eax
jl 0x41e556
mov al, byte [esp + 0x48]
mov cl, byte [esp + 0x28]
shr al, cl
mov ecx, edi
mov dword [esp + 0x14], edx
add esi, 2
movzx ax, al
shl eax, cl
mov cl, byte [esp + 0x44]
mov dl, cl
mov cl, byte [esp + 0x20]
shr dl, cl
mov ecx, dword [esp + 0x2c]
movzx bp, dl
shl ebp, cl
mov cl, byte [esp + 0x3c]
mov dl, cl
mov cl, bl
xor bx, bx
shr dl, cl
add eax, ebp
mov ebp, dword [esp + 0x1c]
mov bl, dl
mov edx, dword [esp + 0x14]
mov ecx, edx
shl ebx, cl
add eax, ebx
mov ebx, dword [esp + 0x40]
mov word [esi - 2], ax
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x28]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x41e50f
mov ecx, dword [ebp + 0x54]
mov esi, dword [ebp + 0x28]
mov eax, 1
mov dword [esp + 0x2ac], 0
lea edx, [ecx + 0x3e]
cmp esi, eax
mov dword [esp + 0x1c], edx
jle 0x41e6cf
add ecx, 0x1e
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x14]
xor ecx, ecx
test eax, eax
jle 0x41e6ab
mov edi, dword [esp + 0x1c]
mov di, word [edi]
cmp word [edx], di
je 0x41e6ab
add edx, 0x20
inc ecx
cmp ecx, eax
jl 0x41e69e
cmp ecx, eax
jne 0x41e6b8
mov dword [esp + eax*4 + 0x2ac], eax
jmp 0x41e6bf
mov dword [esp + eax*4 + 0x2ac], ecx
mov edi, dword [esp + 0x1c]
add edi, 0x20
inc eax
cmp eax, esi
mov dword [esp + 0x1c], edi
jl 0x41e68d
mov eax, dword [esp + 0x6b4]
test eax, eax
je 0x41e700
mov ecx, dword [ebp + 0x54]
xor eax, eax
add ecx, 0x1e
test esi, esi
jle 0x41e700
mov edx, dword [esp + 0x50]
xor edi, edi
mov di, word [ecx]
cmp edi, edx
je 0x41e6fd
add ecx, 0x20
inc eax
cmp eax, esi
jl 0x41e6ea
jmp 0x41e700
mov dword [ebp + 0x2c], eax
mov eax, dword [ebp + 0x24]
imul eax, dword [ebp + 0x20]
push eax
call fcn.0050a4f5
mov ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x20]
push ebx
push ecx
push edx
push eax
mov dword [ebp + 0x58], eax
call fcn.0050b0c8
mov eax, dword [ebp + 0x24]
add esp, 0x14
imul eax, dword [ebp + 0x20]
xor esi, esi
test eax, eax
jle 0x41e748
mov ecx, dword [ebp + 0x58]
xor edx, edx
mov dl, byte [ecx + esi]
lea edi, [ecx + esi]
inc esi
mov cl, byte [esp + edx*4 + 0x2ac]
cmp esi, eax
mov byte [edi], cl
jl 0x41e72f
push ebx
call fcn.0050ae47
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x69c
ret