Function at 0x40bdd0
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x438998
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa4
push ebp
push 0x800
mov ebp, ecx
call fcn.004046e0
mov al, byte [ebp + 0x41e6]
mov cx, word [ebp + 0x41e0]
mov dl, byte [ebp + 0x41e7]
mov byte [esp + 9], al
mov ax, word [ebp + 0x41e2]
mov word [esp + 0x24], cx
mov cl, byte [ebp + 0x41e8]
mov byte [esp + 8], dl
mov dx, word [ebp + 0x41e4]
mov word [esp + 0x20], ax
mov eax, dword [esp + 0xbc]
mov byte [esp + 0xb], cl
mov ecx, dword [esp + 0xc4]
mov word [esp + 0x28], dx
lea edx, [eax + ecx]
cmp eax, edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x48], edx
jge 0x40c49a
mov edx, dword [esp + 0xc0]
push ebx
mov ebx, dword [esp + 0xbc]
lea eax, [ebp + 0x1e4]
push esi
mov esi, dword [esp + 0x50]
mov dword [esp + 0x58], eax
lea eax, [ebx + edx]
push edi
mov dword [esp + 0x58], eax
mov dword [esp + 0x3c], ecx
mov ecx, dword [esp + 0x5c]
call fcn.004181a0
mov eax, dword [ebp + 0x3a1c]
mov ecx, dword [ebp + 0x3a20]
push eax
push ecx
mov dword [esp + 0xc4], 0
mov dword [esp + 0x80], ecx
mov dword [esp + 0x7c], ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x70], eax
mov eax, dword [ebp + 0x3a24]
mov edi, dword [ebp + 0x3a20]
push 0
push eax
push edi
mov dword [esp + 0x88], edi
mov dword [esp + 0x74], edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
mov dword [esp + 0x68], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
cmp ebx, dword [esp + 0x58]
mov byte [esp + 0xbc], 2
mov dword [esp + 0x20], ebx
jge 0x40c434
mov eax, dword [esp + 0xcc]
mov dword [esp + 0x40], eax
jmp 0x40bf10
mov eax, dword [esp + 0x40]
nop
mov edi, 0x10
cmp eax, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
jge 0x40bf25
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x3c]
cmp eax, edi
jge 0x40bf33
mov dword [esp + 0x1c], eax
mov edi, eax
push 1
lea ecx, [esp + 0x1a]
push ecx
mov ecx, ebp
call fcn.00404470
mov al, byte [esp + 0x16]
test al, 1
je 0x40c080
mov eax, dword [ebp + 0x1c4]
mov edx, edi
imul edx, dword [esp + 0x18]
push edx
push eax
mov ecx, ebp
call fcn.00404470
mov ecx, dword [ebp + 0x1c4]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x48], ecx
lea ecx, [edi + eax]
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x60], ecx
jge 0x40c40b
mov edx, dword [esp + 0x18]
lea eax, [edx + ebx]
mov dword [esp + 0x80], eax
cmp ebx, eax
mov dword [esp + 0x18], ebx
jge 0x40c06a
movzx eax, byte [esp + 0x17]
movzx ecx, byte [esp + 0x14]
movzx edx, byte [esp + 0x15]
movzx ebx, word [esp + 0x2c]
mov dword [esp + 0x44], eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x4c], edx
mov edi, edi
mov eax, dword [esp + 0x48]
movzx edi, byte [eax]
mov ecx, dword [esp + 0x44]
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x34]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x38]
movzx eax, al
or eax, 0x200
shl eax, 8
mov dword [esp + 0x50], eax
mov eax, edi
shr eax, cl
and eax, ebx
imul eax, eax, 0xff
cdq
idiv ebx
movzx ecx, al
mov eax, dword [esp + 0x50]
or eax, ecx
mov ecx, dword [esp + 0x4c]
shl eax, 8
mov dword [esp + 0x50], eax
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov edi, dword [esp + 0x18]
mov ecx, dword [ebp + 0x3a20]
movzx edx, al
mov eax, dword [esp + 0x50]
or eax, edx
push eax
mov eax, dword [esp + 0x20]
push eax
push edi
push ecx
call dword [sym.imp.GDI32.dll_SetPixelV]
inc dword [esp + 0x48]
mov eax, dword [esp + 0x80]
inc edi
cmp edi, eax
mov dword [esp + 0x18], edi
jl 0x40bfc0
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
inc edx
cmp edx, ecx
mov dword [esp + 0x1c], edx
jl 0x40bf92
jmp 0x40c40b
test al, 2
je 0x40c106
push 1
lea edx, [esp + 0x2b]
push edx
mov ecx, ebp
call fcn.00404470
movzx ebx, byte [esp + 0x27]
mov cl, byte [esp + 0x17]
movzx edi, word [esp + 0x34]
mov eax, ebx
shr eax, cl
mov cl, byte [esp + 0x14]
and eax, edi
imul eax, eax, 0xff
cdq
idiv edi
movzx edi, al
mov eax, ebx
shr eax, cl
movzx ecx, word [esp + 0x2c]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov cl, byte [esp + 0x15]
or edi, 0x200
shl edi, 8
movzx eax, al
or edi, eax
mov eax, ebx
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ebx, dword [esp + 0x20]
shl edi, 8
movzx ecx, al
or edi, ecx
mov dword [esp + 0x6c], edi
jmp 0x40c10a
mov edi, dword [esp + 0x6c]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
add edx, ebx
mov dword [esp + 0x8c], edx
mov edx, dword [ebp + 0x3a20]
push edi
add ecx, eax
push edx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], eax
mov dword [esp + 0x98], ecx
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [ebp + 0x3a20]
push 0
push 0
push 0
lea eax, [esp + 0x90]
push eax
push 2
push 0
push 0
push ecx
call dword [sym.imp.GDI32.dll_ExtTextOutA]
test byte [esp + 0x16], 4
je 0x40c1e8
push 1
lea edx, [esp + 0x2a]
push edx
mov ecx, ebp
call fcn.00404470
movzx edi, byte [esp + 0x26]
mov cl, byte [esp + 0x17]
movzx esi, word [esp + 0x34]
mov eax, edi
shr eax, cl
mov cl, byte [esp + 0x14]
movzx ebx, word [esp + 0x2c]
and eax, esi
imul eax, eax, 0xff
cdq
idiv esi
movzx esi, al
mov eax, edi
shr eax, cl
mov cl, byte [esp + 0x15]
or esi, 0x200
shl esi, 8
and eax, ebx
imul eax, eax, 0xff
cdq
idiv ebx
mov ebx, dword [esp + 0x20]
movzx eax, al
or esi, eax
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
shl esi, 8
movzx ecx, al
or esi, ecx
test byte [esp + 0x16], 8
je 0x40c40b
push 1
lea edx, [esp + 0x17]
push edx
mov ecx, ebp
call fcn.00404470
mov al, byte [esp + 0x16]
mov edi, dword [ebp + 0x1c4]
test al, 0x10
movzx eax, byte [esp + 0x13]
mov ecx, ebp
je 0x40c354
lea eax, [eax + eax*2]
push eax
push edi
call fcn.00404470
mov al, byte [esp + 0x13]
test al, al
mov dword [esp + 0x18], 0
jbe 0x40c40b
movzx ecx, byte [esp + 0x17]
movzx edx, byte [esp + 0x14]
movzx eax, byte [esp + 0x15]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x38], edx
mov dword [esp + 0x4c], eax
movzx ebx, byte [edi]
mov ecx, dword [esp + 0x44]
mov eax, ebx
shr eax, cl
movzx ecx, word [esp + 0x34]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x38]
movzx esi, al
mov eax, ebx
shr eax, cl
movzx ecx, word [esp + 0x2c]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
or esi, 0x200
shl esi, 8
movzx ecx, al
or esi, ecx
mov ecx, dword [esp + 0x4c]
mov eax, ebx
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
shl esi, 8
movzx edx, al
movzx eax, byte [edi + 1]
or esi, edx
inc edi
mov edx, eax
and eax, 0xf
shr edx, 4
mov ebx, eax
movzx eax, byte [edi + 1]
inc edi
mov ecx, eax
shr ecx, 4
and eax, 0xf
inc ecx
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
add eax, ebx
mov ebx, dword [esp + 0x20]
add edx, ebx
mov dword [esp + 0x94], edx
add edx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x9c], edx
mov edx, dword [ebp + 0x3a20]
mov dword [esp + 0x98], eax
push esi
add eax, ecx
push edx
inc edi
mov dword [esp + 0xa8], eax
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [ebp + 0x3a20]
push 0
push 0
push 0
lea eax, [esp + 0xa0]
push eax
push 2
push 0
push 0
push ecx
call dword [sym.imp.GDI32.dll_ExtTextOutA]
mov eax, dword [esp + 0x18]
movzx edx, byte [esp + 0x13]
inc eax
cmp eax, edx
mov dword [esp + 0x18], eax
jl 0x40c253
jmp 0x40c407
shl eax, 1
push eax
push edi
call fcn.00404470
mov al, byte [esp + 0x13]
test al, al
mov dword [esp + 0x18], 0
jbe 0x40c40b
movzx eax, byte [edi]
mov edx, eax
and eax, 0xf
shr edx, 4
mov ebx, eax
movzx eax, byte [edi + 1]
inc edi
mov ecx, eax
shr ecx, 4
and eax, 0xf
inc ecx
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
add eax, ebx
mov ebx, dword [esp + 0x20]
add edx, ebx
mov dword [esp + 0xa4], edx
add edx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0xac], edx
mov edx, dword [ebp + 0x3a20]
mov dword [esp + 0xa8], eax
push esi
add eax, ecx
push edx
inc edi
mov dword [esp + 0xb8], eax
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [ebp + 0x3a20]
push 0
push 0
push 0
lea eax, [esp + 0xb0]
push eax
push 2
push 0
push 0
push ecx
call dword [sym.imp.GDI32.dll_ExtTextOutA]
mov eax, dword [esp + 0x18]
movzx edx, byte [esp + 0x13]
inc eax
cmp eax, edx
mov dword [esp + 0x18], eax
jl 0x40c371
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x58]
add ebx, 0x10
sub ecx, 0x10
cmp ebx, eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x40], ecx
jl 0x40bf0b
mov edi, dword [esp + 0x7c]
mov ebx, dword [esp + 0xc4]
mov eax, dword [esp + 0x64]
push 0
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
mov dword [esp + 0x68], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x78]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x70], eax
mov dword [esp + 0xbc], 0xffffffff
call fcn.004181b0
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x54]
add eax, 0x10
sub edx, 0x10
cmp eax, ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], edx
jl 0x40be85
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
pop ebp
mov dword fs:[0], ecx
add esp, 0xb0
ret 0x10