Function at 0x40c4c0
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, 0xa8
push ebp
push 0x1000
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 + 0x20], cx
mov cl, byte [ebp + 0x41e8]
mov byte [esp + 8], dl
mov dx, word [ebp + 0x41e4]
mov word [esp + 0x1c], ax
mov eax, dword [esp + 0xc0]
mov byte [esp + 0xa], cl
mov ecx, dword [esp + 0xc8]
mov word [esp + 0x24], dx
lea edx, [eax + ecx]
cmp eax, edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x4c], edx
jge 0x40cb9f
mov edx, dword [esp + 0xc4]
push ebx
mov ebx, dword [esp + 0xc0]
lea eax, [ebp + 0x1e4]
push esi
mov esi, dword [esp + 0x54]
mov dword [esp + 0x5c], eax
lea eax, [ebx + edx]
push edi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x60]
call fcn.004181a0
mov eax, dword [ebp + 0x3a1c]
mov ecx, dword [ebp + 0x3a20]
push eax
push ecx
mov dword [esp + 0xc8], 0
mov dword [esp + 0x84], ecx
mov dword [esp + 0x80], ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x74], eax
mov eax, dword [ebp + 0x3a24]
mov edi, dword [ebp + 0x3a20]
push 0
push eax
push edi
mov dword [esp + 0x8c], edi
mov dword [esp + 0x78], edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
mov dword [esp + 0x6c], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
cmp ebx, dword [esp + 0x5c]
mov byte [esp + 0xc0], 2
mov dword [esp + 0x20], ebx
jge 0x40cb39
mov eax, dword [esp + 0xd0]
mov dword [esp + 0x38], eax
jmp 0x40c602
mov eax, dword [esp + 0x38]
mov edi, 0x10
cmp eax, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], edi
jge 0x40c617
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4c]
cmp eax, edi
jge 0x40c625
mov dword [esp + 0x1c], eax
mov edi, eax
push 1
lea ecx, [esp + 0x1b]
push ecx
mov ecx, ebp
call fcn.00404470
mov al, byte [esp + 0x17]
test al, 1
je 0x40c781
mov eax, dword [ebp + 0x1c4]
mov edx, edi
imul edx, dword [esp + 0x18]
shl edx, 1
push edx
push eax
mov ecx, ebp
call fcn.00404470
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 0x1c4]
add edi, eax
cmp eax, edi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x84], edi
jge 0x40cb0d
mov edx, dword [esp + 0x18]
lea eax, [edx + ebx]
mov dword [esp + 0x64], eax
jmp 0x40c690
cmp ebx, eax
mov dword [esp + 0x18], ebx
jge 0x40c76b
movzx eax, byte [esp + 0x16]
movzx ecx, byte [esp + 0x14]
movzx edx, byte [esp + 0x15]
movzx ebx, word [esp + 0x28]
mov dword [esp + 0x50], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x3c], edx
lea esp, [esp]
mov eax, dword [esp + 0x40]
movzx edi, word [eax]
mov ecx, dword [esp + 0x50]
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x34]
movzx eax, al
or eax, 0x200
shl eax, 8
mov dword [esp + 0x54], eax
mov eax, edi
shr eax, cl
and eax, ebx
imul eax, eax, 0xff
cdq
idiv ebx
movzx ecx, al
mov eax, dword [esp + 0x54]
or eax, ecx
mov ecx, dword [esp + 0x3c]
shl eax, 8
mov dword [esp + 0x54], eax
mov eax, edi
shr eax, cl
movzx ecx, word [esp + 0x2c]
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 + 0x54]
or eax, edx
push eax
mov eax, dword [esp + 0x20]
push eax
push edi
push ecx
call dword [sym.imp.GDI32.dll_SetPixelV]
add dword [esp + 0x40], 2
mov eax, dword [esp + 0x64]
inc edi
cmp edi, eax
mov dword [esp + 0x18], edi
jl 0x40c6c0
mov edi, dword [esp + 0x84]
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
inc ecx
cmp ecx, edi
mov dword [esp + 0x1c], ecx
jl 0x40c690
jmp 0x40cb0d
test al, 2
je 0x40c807
push 2
lea edx, [esp + 0x48]
push edx
mov ecx, ebp
call fcn.00404470
movzx ebx, word [esp + 0x44]
mov cl, byte [esp + 0x16]
movzx edi, word [esp + 0x30]
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 + 0x28]
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 + 0x2c]
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 + 0x70], edi
jmp 0x40c80b
mov edi, dword [esp + 0x70]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
add edx, ebx
mov dword [esp + 0x90], edx
mov edx, dword [ebp + 0x3a20]
push edi
add ecx, eax
push edx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x94], eax
mov dword [esp + 0x9c], ecx
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [ebp + 0x3a20]
push 0
push 0
push 0
lea eax, [esp + 0x94]
push eax
push 2
push 0
push 0
push ecx
call dword [sym.imp.GDI32.dll_ExtTextOutA]
test byte [esp + 0x17], 4
je 0x40c8e9
push 2
lea edx, [esp + 0x4c]
push edx
mov ecx, ebp
call fcn.00404470
movzx edi, word [esp + 0x48]
mov cl, byte [esp + 0x16]
movzx esi, word [esp + 0x30]
mov eax, edi
shr eax, cl
mov cl, byte [esp + 0x14]
movzx ebx, word [esp + 0x28]
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 + 0x2c]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
shl esi, 8
movzx ecx, al
or esi, ecx
test byte [esp + 0x17], 8
je 0x40cb0d
push 1
lea edx, [esp + 0x17]
push edx
mov ecx, ebp
call fcn.00404470
mov al, byte [esp + 0x17]
mov edi, dword [ebp + 0x1c4]
test al, 0x10
movzx eax, byte [esp + 0x13]
mov ecx, ebp
je 0x40ca56
shl eax, 2
push eax
push edi
call fcn.00404470
mov al, byte [esp + 0x13]
test al, al
mov dword [esp + 0x18], 0
jbe 0x40cb0d
movzx ecx, byte [esp + 0x16]
movzx edx, byte [esp + 0x14]
movzx eax, byte [esp + 0x15]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x34], edx
mov dword [esp + 0x3c], eax
movzx ebx, word [edi]
mov ecx, dword [esp + 0x50]
mov eax, ebx
shr eax, cl
movzx ecx, word [esp + 0x30]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x34]
add edi, 2
movzx esi, al
mov eax, ebx
shr eax, cl
movzx ecx, word [esp + 0x28]
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 + 0x3c]
mov eax, ebx
shr eax, cl
movzx ecx, word [esp + 0x2c]
and eax, ecx
imul eax, eax, 0xff
cdq
idiv ecx
shl esi, 8
movzx edx, al
movzx eax, byte [edi]
or esi, edx
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 + 0x24]
add eax, ebx
mov ebx, dword [esp + 0x20]
add edx, ebx
mov dword [esp + 0x98], edx
add edx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0xa0], edx
mov edx, dword [ebp + 0x3a20]
mov dword [esp + 0x9c], eax
push esi
add eax, ecx
push edx
inc edi
mov dword [esp + 0xac], eax
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [ebp + 0x3a20]
push 0
push 0
push 0
lea eax, [esp + 0xa4]
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 0x40c954
jmp 0x40cb09
shl eax, 1
push eax
push edi
call fcn.00404470
mov al, byte [esp + 0x13]
test al, al
mov dword [esp + 0x18], 0
jbe 0x40cb0d
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 + 0x24]
add eax, ebx
mov ebx, dword [esp + 0x20]
add edx, ebx
mov dword [esp + 0xa8], edx
add edx, ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0xb0], edx
mov edx, dword [ebp + 0x3a20]
mov dword [esp + 0xac], eax
push esi
add eax, ecx
push edx
inc edi
mov dword [esp + 0xbc], eax
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [ebp + 0x3a20]
push 0
push 0
push 0
lea eax, [esp + 0xb4]
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 0x40ca73
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x5c]
add ebx, 0x10
sub ecx, 0x10
cmp ebx, eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x38], ecx
jl 0x40c5fe
mov ebx, dword [esp + 0xc8]
mov edi, dword [esp + 0x80]
mov eax, dword [esp + 0x68]
push 0
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectPalette]
push edi
mov dword [esp + 0x6c], eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x7c]
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x74], eax
mov dword [esp + 0xc0], 0xffffffff
call fcn.004181b0
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x58]
add eax, 0x10
sub edx, 0x10
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x4c], edx
jl 0x40c575
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xac]
pop ebp
mov dword fs:[0], ecx
add esp, 0xb4
ret 0x10