Function at 0x413550
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
lea edx, [ebp - 0x46c]
push ebx
sub esp, 0x480
mov dword [ebp - 0x474], ecx
mov ebx, dword [sym.imp.gdi32.dll_GetObjectW]
mov dword [ebp - 0x470], eax
mov dword [ebp - 0x450], 0
mov dword [ebp - 0x44c], 0xffffffff
mov dword [ebp - 0x448], 0xfffffc18
mov dword [ebp - 0x444], 0xffffffff
mov dword [ebp - 0x440], 0x200
mov dword [esp + 8], edx
mov dword [esp + 4], 0x18
mov dword [esp], eax
call ebx
sub esp, 0xc
mov esi, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x45
xor eax, eax
cmp esi, 0x18
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str.GetObject_returned__d_n
call fcn.00401820
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x47
mov eax, dword [ebp - 0x46c]
mov dword [esp + 4], str.wrong_bm.bmType__d_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401820
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x48
mov eax, dword [ebp - 0x468]
mov dword [esp + 4], str.wrong_bm.bmWidth__d_n
mov dword [esp + 8], eax
mov esi, dword [ebp - 0x474]
cmp dword [esi + 4], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401820
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x49
mov eax, dword [ebp - 0x464]
mov dword [esp + 4], str.wrong_bm.bmHeight__d_n
mov dword [esp + 8], eax
cmp dword [esi + 8], eax
sete al
mov dword [ebp - 0x474], esi
movzx eax, al
mov dword [esp], eax
call fcn.00401820
movzx esi, word [ebp - 0x45a]
imul esi, dword [ebp - 0x468]
call fcn.00492bc0
mov dword [eax], 0x499014
add esi, 0xf
mov dword [eax + 4], 0x4b
mov eax, dword [ebp - 0x460]
sar esi, 3
mov dword [esp + 4], str.wrong_bm.bmWidthBytes__d____d_n
and esi, 0xfffffffe
mov dword [esp + 8], eax
cmp eax, esi
mov dword [esp + 0xc], esi
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401820
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x4c
movzx edx, word [ebp - 0x45c]
xor eax, eax
mov dword [esp + 4], str.wrong_bm.bmPlanes__d_n
mov dword [esp + 8], edx
mov esi, dword [ebp - 0x474]
cmp word [esi + 0xc], dx
sete al
mov dword [esp], eax
call fcn.00401820
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x4d
movzx eax, word [ebp - 0x45a]
mov dword [esp + 0xc], edi
cmp eax, edi
mov dword [esp + 8], eax
sete al
mov dword [esp + 4], str.wrong_bm.bmBitsPixel__d____d_n
movzx eax, al
mov dword [esp], eax
call fcn.00401820
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x4e
mov eax, dword [ebp - 0x458]
mov dword [esp + 4], str.wrong_bm.bmBits__p_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401820
mov eax, dword [ebp - 0x460]
imul eax, dword [ebp - 0x464]
cmp eax, 0x200
ja 0x413b79
lea edi, [ebp - 0x454]
mov dword [ebp - 0x454], eax
mov edx, dword fs:[0x18]
mov dword [edx + 0x34], 0xdeadbeef
mov dword [ebp - 0x478], ebx
mov ebx, edi
mov edi, dword [ebp - 0x470]
nop
mov dword [esp + 8], 0
mov eax, dword [ebx]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.gdi32.dll_GetBitmapBits]
sub esp, 0xc
mov esi, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x59
mov eax, dword [ebp - 0x460]
imul eax, dword [ebp - 0x464]
mov dword [esp + 8], esi
mov dword [esp + 4], str._d____d_n
cmp eax, esi
mov dword [esp + 0xc], eax
sete al
add ebx, 4
movzx eax, al
mov dword [esp], eax
call fcn.00401820
lea eax, [ebp - 0x43c]
cmp eax, ebx
jne 0x4137d0
mov eax, 0xaaaaaaaa
mov ecx, pe_nt_image_headers32
lea edi, [ebp - 0x20c]
xor esi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x460]
imul eax, dword [ebp - 0x464]
mov ebx, dword [ebp - 0x478]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x20c]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x478], ebx
mov ebx, esi
cmp ebx, 1
je 0x413af8
mov eax, 0xaaaaaaaa
mov ecx, pe_nt_image_headers32
lea edi, [ebp - 0x40c]
mov esi, dword [ebp - 0x460]
rep stosd dword es:[edi], eax
imul esi, dword [ebp - 0x464]
lea eax, [ebp - 0x40c]
mov dword [esp + 8], eax
mov eax, dword [ebp + ebx*4 - 0x454]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x470]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GetBitmapBits]
sub esp, 0xc
mov edi, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x65
xor eax, eax
cmp esi, edi
sete al
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.Test__d_:__d____d_n
mov dword [esp], eax
call fcn.00401820
test esi, esi
je 0x413967
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x67
lea eax, [ebp - 0x20c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x40c]
mov dword [esp + 8], 0x200
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
mov edx, dword [ebp - 0x474]
test eax, eax
movzx ecx, word [edx + 0xe]
sete al
mov dword [esp + 8], ebx
movzx eax, al
mov dword [esp + 4], str.Test__d_:_buffers_do_not_match__depth__d_n
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call fcn.00401820
add ebx, 1
cmp ebx, 6
jne 0x413881
lea eax, [ebp - 0x43c]
mov ebx, dword [ebp - 0x478]
mov dword [esp + 4], 0x30
mov dword [esp + 8], eax
mov edi, dword [ebp - 0x470]
mov dword [esp], edi
call ebx
sub esp, 0xc
mov esi, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x6d
xor eax, eax
cmp esi, 0x18
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], 0x49a5be
call fcn.00401820
lea eax, [ebp - 0x46c]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 0xc
call ebx
sub esp, 0xc
mov esi, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x70
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str._d___0_n
call fcn.00401820
lea eax, [ebp - 0x46c]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 0
call ebx
sub esp, 0xc
mov esi, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x73
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp], eax
mov dword [esp + 4], str._d___0_n
call fcn.00401820
lea eax, [ebp - 0x46c]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
call ebx
sub esp, 0xc
mov esi, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x76
xor eax, eax
test esi, esi
sete al
mov dword [esp + 8], esi
mov dword [esp + 4], str._d___0_n
mov dword [esp], eax
call fcn.00401820
mov dword [esp], edi
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call ebx
sub esp, 0xc
mov ebx, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x79
xor eax, eax
cmp ebx, 0x18
sete al
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x49a5be
mov dword [esp], eax
call fcn.00401820
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0xaaaaaaaa
mov ecx, pe_nt_image_headers32
lea edi, [ebp - 0x40c]
mov ebx, 2
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x40c]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x450]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x470]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GetBitmapBits]
sub esp, 0xc
mov esi, eax
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x65
xor eax, eax
test esi, esi
sete al
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], str.Test__d_:__d____d_n
mov dword [esp], eax
call fcn.00401820
jmp 0x41388a
mov dword [esp + 8], 0x50
mov dword [esp + 4], str..._dlls_gdi32_tests_bitmap.c
mov dword [esp], str.sizeof_buf____bm.bmWidthBytes__bm.bmHeight
call dword [sym.imp.msvcrt.dll__assert]
lea esi, [esi]
lea esi, [esi]