Function at 0x54c317
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0xee37e4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
and dword [ebp - 0x24], 0
and dword [ebp - 0x48], 0
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x50], eax
mov edx, dword [ebp + 0x10]
push edi
mov edi, ecx
mov dword [ebp - 0x30], esi
mov ecx, dword [esi + 0x18]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x20], 0x1fff
mov dword [ebp - 0x1c], 0xaaa
mov dword [ebp - 0x18], 0x492
mov dword [ebp - 0x14], 0x222
mov dword [ebp - 0x10], 0x108
mov dword [ebp - 0xc], 0x82
push 0x40
pop ebx
mov dword [ebp - 8], ebx
test ecx, ecx
je 0x54c431
cmp ecx, 2
jne 0x54c39b
lea eax, [ebp - 0x50]
mov ecx, edi
push eax
push edx
mov edx, esi
call fcn.0054c0bf
jmp 0x54c427
cmp ecx, 1
jne 0x54c3b0
lea eax, [ebp - 0x50]
mov ecx, edi
push eax
push edx
mov edx, esi
call fcn.0054beee
jmp 0x54c427
mov eax, dword [esi + 4]
cmp eax, 0xc
je 0x54c3d1
cmp eax, 0x28
je 0x54c3d1
cmp eax, 0x34
je 0x54c3d1
cmp eax, 0x38
je 0x54c3d1
cmp eax, 0x6c
je 0x54c3d1
cmp eax, 0x7c
jne 0x54c3db
cmp ecx, 3
je 0x54c431
cmp ecx, 6
je 0x54c431
cmp eax, 0xc
je 0x54c3e9
cmp eax, 0x10
je 0x54c3e9
cmp eax, ebx
jne 0x54c3fe
cmp ecx, 4
jne 0x54c3fe
lea eax, [ebp - 0x50]
mov ecx, edi
push eax
push edx
mov edx, esi
call fcn.0054bcb3
jmp 0x54c427
cmp eax, 0xc
je 0x54c410
cmp eax, 0x10
je 0x54c410
cmp eax, ebx
jne 0x54cad3
cmp ecx, 3
jne 0x54cad3
lea eax, [ebp - 0x50]
mov ecx, edi
push eax
push edx
mov edx, esi
call fcn.0054bbcf
pop ecx
pop ecx
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x3c], eax
jmp 0x54c434
mov dword [ebp - 0x3c], edx
movzx eax, word [esi + 0x14]
mov ecx, edi
mov dword [ebp - 0x9c], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x98], eax
call fcn.004f703f
xor edi, edi
push edi
push eax
call fcn.00724770
mov ebx, dword [ebp - 0x98]
mov esi, dword [ebp - 0x6c]
mov dword [ebp - 0x58], ebx
pop ecx
pop ecx
test eax, eax
jne 0x54c4ae
mov eax, dword [esi + 0x20]
cmp dword [eax + 0x40], edi
jne 0x54c4ae
push 1
push edi
push ebx
mov ebx, dword [ebp - 0x30]
mov ecx, esi
push dword [ebp - 0x44]
mov edx, dword [ebx + 0x3a4]
call fcn.004f7d1a
mov edx, dword [ebx + 0x24]
mov edi, eax
mov ecx, dword [ebx + 0x20]
add esp, 0x10
mov dword [ebp - 0x68], edi
mov dword [edi + 0x24], ecx
mov dword [edi + 0x28], edx
mov edx, edi
call fcn.004f80a4
mov ebx, dword [ebp - 0x58]
jmp 0x54c4b1
mov edi, dword [ebp - 0x68]
mov ecx, esi
call fcn.004f70d4
test eax, eax
jne 0x54cae1
mov edx, dword [ebp - 0x30]
mov ecx, dword [edi + 0x30]
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x64], ecx
cmp dword [edx + 0x37c], 0
mov dword [ebp - 0x94], eax
jne 0x54c4f4
lea eax, [ebx - 1]
mov ebx, dword [ebp - 0x94]
imul eax, ebx
add ecx, eax
neg ebx
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x94], ebx
mov ecx, dword [ebp - 0x44]
mov ebx, ecx
imul ebx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0x90], edi
add ebx, 0x1f
shr ebx, 5
shl ebx, 2
mov eax, ebx
mov dword [ebp - 0xa4], ebx
imul eax, dword [ebp - 0x58]
add eax, edi
mov edi, dword [ebp - 0x68]
cmp eax, dword [ebp - 0x50]
jbe 0x54c561
push str.premature_end_in_bitmap_data_in_bmp_image
push esi
call fcn.004f6fc4
mov eax, dword [ebp - 0x50]
xor edx, edx
sub eax, dword [ebp - 0x3c]
div ebx
pop ecx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x98], eax
pop ecx
test eax, eax
je 0x54caf3
cmp eax, 0x7fff
jg 0x54caf3
mov edx, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x44]
mov eax, dword [edx + 0x390]
cmp eax, 8
jae 0x54c575
mov esi, dword [ebp + eax*4 - 0x24]
mov dword [ebp - 0x70], esi
jmp 0x54c57c
mov dword [ebp - 0x70], 1
mov ebx, dword [edx + 0x394]
cmp ebx, 8
jae 0x54c590
mov esi, dword [ebp + ebx*4 - 0x24]
mov dword [ebp - 0x78], esi
jmp 0x54c597
mov dword [ebp - 0x78], 1
mov esi, dword [edx + 0x398]
cmp esi, 8
jae 0x54c5ab
mov esi, dword [ebp + esi*4 - 0x24]
mov dword [ebp - 0x80], esi
jmp 0x54c5b2
mov dword [ebp - 0x80], 1
mov esi, dword [edx + 0x39c]
cmp esi, 8
jae 0x54c5cc
mov edi, dword [ebp + esi*4 - 0x24]
mov dword [ebp - 0x88], edi
mov edi, dword [ebp - 0x68]
jmp 0x54c5d6
mov dword [ebp - 0x88], 1
mov dword [ebp - 0x54], 5
cmp eax, 8
jae 0x54c5e7
mov eax, dword [ebp - 0x54]
jmp 0x54c5ea
add eax, 0xfffffff8
mov dword [ebp - 0x74], eax
cmp ebx, 8
jae 0x54c5fa
mov ebx, dword [ebp - 0x54]
mov dword [ebp - 0x7c], ebx
jmp 0x54c603
lea eax, [ebx - 8]
mov ebx, dword [ebp - 0x54]
mov dword [ebp - 0x7c], eax
mov eax, dword [edx + 0x398]
cmp eax, 8
jae 0x54c616
mov dword [ebp - 0x84], ebx
jmp 0x54c61f
add eax, 0xfffffff8
mov dword [ebp - 0x84], eax
cmp esi, 8
jb 0x54c62a
lea eax, [esi - 8]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x58], 0
mov esi, dword [ebp - 0x6c]
jle 0x54cab0
mov eax, dword [ebp - 0xa0]
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x2c], edi
mov ebx, dword [ebp - 0x90]
mov esi, eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0x28], ebx
sub eax, 1
je 0x54c9ea
sub eax, 1
je 0x54c963
dec eax
sub eax, 1
je 0x54c8e4
sub eax, 4
je 0x54c89e
sub eax, 8
je 0x54c7d9
sub eax, 8
je 0x54c7a6
sub eax, 8
jne 0x54ca7f
test ecx, ecx
je 0x54ca7f
mov edi, ecx
movzx ecx, byte [ebx + 3]
movzx eax, byte [ebx + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx]
shl ecx, 8
or ecx, eax
mov eax, dword [edx + 0x2c]
and eax, ecx
mov dword [ebp - 0x28], ecx
mov ecx, dword [edx + 0x380]
shr eax, cl
mov ecx, dword [edx + 0x30]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x28]
and ecx, eax
mov dword [ebp - 0x40], ecx
mov ecx, dword [edx + 0x384]
shr dword [ebp - 0x40], cl
mov ecx, dword [edx + 0x34]
and ecx, eax
mov dword [ebp - 0x34], ecx
mov ecx, dword [edx + 0x388]
shr dword [ebp - 0x34], cl
cmp dword [edx + 0x39c], 0
jne 0x54c713
mov eax, 0xff
jmp 0x54c726
mov ecx, dword [edx + 0x38]
and ecx, eax
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x28]
mov ecx, dword [edx + 0x38c]
shr eax, cl
mov ecx, dword [ebp - 0x4c]
imul ecx, dword [ebp - 0x70]
mov dword [ebp - 0x28], eax
imul eax, dword [ebp - 0x88]
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 0x74]
shr dword [ebp - 0x4c], cl
mov ecx, dword [ebp - 0x4c]
mov byte [esi], cl
mov ecx, dword [ebp - 0x40]
imul ecx, dword [ebp - 0x78]
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x7c]
shr dword [ebp - 0x40], cl
mov ecx, dword [ebp - 0x40]
mov byte [esi + 1], cl
mov ecx, dword [ebp - 0x34]
imul ecx, dword [ebp - 0x80]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x84]
shr dword [ebp - 0x34], cl
mov ecx, dword [ebp - 0x34]
mov byte [esi + 2], cl
mov ecx, dword [ebp - 0x54]
shr eax, cl
cmp dword [edx + 0x39c], 0
movzx ecx, al
mov eax, dword [ebp - 0x28]
movzx eax, al
cmove ecx, eax
add ebx, 4
mov byte [esi + 3], cl
add esi, 4
sub edi, 1
jne 0x54c6ad
mov edi, dword [ebp - 0x2c]
jmp 0x54ca7f
test ecx, ecx
je 0x54ca7f
mov edx, 0xff
mov al, byte [ebx + 2]
mov byte [esi], al
lea esi, [esi + 4]
mov al, byte [ebx + 1]
mov byte [esi - 3], al
mov al, byte [ebx]
lea ebx, [ebx + 3]
mov byte [esi - 2], al
mov byte [esi - 1], dl
sub ecx, 1
jne 0x54c7b3
mov edx, dword [ebp - 0x30]
jmp 0x54ca7f
test ecx, ecx
je 0x54ca7f
mov edi, ecx
movzx edx, byte [ebx + 1]
movzx eax, byte [ebx]
shl edx, 8
or edx, eax
mov eax, dword [ebp - 0x30]
mov ebx, dword [eax + 0x30]
mov ecx, dword [eax + 0x384]
and ebx, edx
mov eax, dword [eax + 0x34]
shr ebx, cl
and eax, edx
mov ecx, dword [ebp - 0x30]
imul ebx, dword [ebp - 0x78]
mov ecx, dword [ecx + 0x388]
shr eax, cl
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x4c], eax
mov eax, dword [ecx + 0x38]
mov ecx, dword [ecx + 0x38c]
and eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 0x2c]
and eax, edx
mov edx, ecx
mov ecx, dword [edx + 0x380]
shr eax, cl
imul eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x74]
shr eax, cl
mov ecx, dword [ebp - 0x7c]
mov byte [esi], al
lea esi, [esi + 4]
mov eax, dword [ebp - 0x4c]
imul eax, dword [ebp - 0x80]
shr ebx, cl
mov ecx, dword [ebp - 0x84]
mov byte [esi - 3], bl
mov ebx, dword [ebp - 0x28]
shr eax, cl
mov ecx, dword [ebp - 0x54]
mov byte [esi - 2], al
mov eax, dword [ebp - 0x34]
imul eax, dword [ebp - 0x88]
shr eax, cl
mov ecx, 0xff
cmp dword [edx + 0x39c], 0
movzx eax, al
cmove eax, ecx
add ebx, 2
mov byte [esi - 1], al
mov dword [ebp - 0x28], ebx
sub edi, 1
jne 0x54c7e3
jmp 0x54c79e
test ecx, ecx
je 0x54ca7f
movzx eax, byte [ebx]
add eax, 0x14
imul eax, eax, 3
mov al, byte [eax + edx]
mov byte [esi], al
lea esi, [esi + 4]
movzx eax, byte [ebx]
imul eax, eax, 3
mov al, byte [eax + edx + 0x3d]
mov byte [esi - 3], al
movzx eax, byte [ebx]
imul eax, eax, 3
inc ebx
mov al, byte [eax + edx + 0x3e]
mov byte [esi - 2], al
mov eax, 0xff
mov byte [esi - 1], al
sub ecx, 1
jne 0x54c8a6
jmp 0x54ca7f
and dword [ebp - 0x28], 0
test ecx, ecx
je 0x54ca7f
mov edi, dword [ebp - 0x28]
mov eax, edi
and eax, 1
sub eax, 0
je 0x54c917
sub eax, 1
jne 0x54c92b
movzx ecx, byte [ebx]
and ecx, 0xf
inc ebx
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0xa0], ecx
jmp 0x54c931
movzx ecx, byte [ebx]
shr ecx, 4
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0xa0], ecx
jmp 0x54c931
mov ecx, dword [ebp - 0x8c]
lea eax, [ecx + 0x14]
imul ecx, ecx, 3
imul eax, eax, 3
mov al, byte [eax + edx]
mov byte [esi], al
mov al, byte [ecx + edx + 0x3d]
mov byte [esi + 1], al
mov al, byte [ecx + edx + 0x3e]
mov byte [esi + 2], al
mov eax, 0xff
mov byte [esi + 3], al
add esi, 4
inc edi
cmp edi, dword [ebp - 0x44]
jb 0x54c8f3
jmp 0x54c79e
xor eax, eax
mov dword [ebp - 0x28], eax
test ecx, ecx
je 0x54ca7f
mov edi, dword [ebp - 0x5c]
push 3
pop ecx
and eax, ecx
sub eax, 0
je 0x54c9a6
sub eax, 1
je 0x54c99e
sub eax, 1
je 0x54c994
sub eax, 1
jne 0x54c9af
movzx edi, byte [ebx]
and edi, ecx
inc ebx
jmp 0x54c9ac
movzx edi, byte [ebx]
shr edi, 2
and edi, ecx
jmp 0x54c9ac
movzx edi, byte [ebx]
shr edi, 4
jmp 0x54c99a
movzx edi, byte [ebx]
shr edi, 6
mov dword [ebp - 0x60], edi
lea eax, [edi + 0x14]
imul ecx, edi, 3
imul eax, eax, 3
mov al, byte [eax + edx]
mov byte [esi], al
mov al, byte [ecx + edx + 0x3d]
mov byte [esi + 1], al
mov al, byte [ecx + edx + 0x3e]
mov byte [esi + 2], al
mov eax, 0xff
mov byte [esi + 3], al
add esi, 4
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
cmp eax, dword [ebp - 0x44]
jb 0x54c973
mov dword [ebp - 0x5c], edi
jmp 0x54c79e
xor eax, eax
mov dword [ebp - 0x28], eax
test ecx, ecx
je 0x54ca7f
and eax, 7
jmp dword [eax*4 + 0x54cb17]
mov eax, dword [ebp - 0x90]
add eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x64]
add eax, dword [ebp - 0x94]
sub dword [ebp - 0x58], 1
mov dword [ebp - 0x64], eax
jne 0x54c652
mov esi, dword [ebp - 0x6c]
mov edi, dword [ebp - 0x68]
push dword [ebp - 0x48]
push esi
call fcn.0052213a
pop ecx
pop ecx
mov edx, edi
call fcn.004f8627
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006f3e28
leave
ret
push ecx
push str.unhandled_compression___u___in_bmp_image
push 2
push edi
call fcn.004f715e
push dword [ebp - 0x48]
push esi
call fcn.0052213a
pop ecx
pop ecx
mov ecx, esi
call fcn.004f7175
mov edx, edi
mov ecx, esi
call fcn.004f7b13
push dword [ebp - 0x48]
push esi
call fcn.0052213a
pop ecx
pop ecx
push str.image_dimensions_out_of_range_in_bmp_image
push 2
push esi
call fcn.004f715e
nop dword [eax]
add edx, ecx
push esp
add byte [ecx], cl
retf 0x54