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

Disassembly:
push 0xffffffffffffffff
push 0x43b088
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x88
push ebx
push ebp
mov ebx, ecx
push 0x800
call fcn.0040bb90
mov al, byte [ebx + 0x4422]
mov cx, word [ebx + 0x441c]
mov dl, byte [ebx + 0x4423]
mov byte [esp + 0x3c], al
mov ax, word [ebx + 0x441e]
mov word [esp + 0x34], cx
mov cl, byte [ebx + 0x4424]
mov word [esp + 0x40], ax
mov eax, dword [esp + 0xa4]
mov byte [esp + 0x38], cl
mov ecx, dword [esp + 0xac]
mov byte [esp + 0x28], dl
mov dx, word [ebx + 0x4420]
mov dword [esp + 0x20], eax
lea ebp, [eax + ecx]
mov word [esp + 0x30], dx
cmp eax, ebp
mov dword [esp + 0x6c], ebp
jge 0x40e9b1
mov eax, dword [esp + 0xa8]
push esi
mov esi, dword [esp + 0xa4]
push edi
mov edi, dword [esp + 0x6c]
mov dword [esp + 0x50], ecx
lea edx, [esi + eax]
mov dword [esp + 0x68], edx
lea eax, [ebx + 0x1e4]
lea ecx, [esp + 0x6c]
push eax
call fcn.00408cb0
mov eax, dword [ebx + 0x3a1c]
mov ecx, dword [ebx + 0x3a20]
push eax
push ecx
lea ecx, [esp + 0x98]
mov dword [esp + 0xa8], 0
call fcn.00408d20
mov edx, dword [ebx + 0x3a24]
mov eax, dword [ebx + 0x3a20]
push edx
push eax
lea ecx, [esp + 0x90]
mov byte [esp + 0xa8], 1
call fcn.00408d60
mov eax, dword [esp + 0x68]
mov byte [esp + 0xa0], 2
cmp esi, eax
mov dword [esp + 0x18], esi
jge 0x40e955
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x60], eax
jmp 0x40e42b
mov eax, dword [esp + 0x60]
mov esi, 0x10
mov ebp, esi
cmp eax, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], ebp
jge 0x40e444
mov dword [esp + 0x20], eax
mov ebp, eax
mov eax, dword [esp + 0x50]
cmp eax, 0x10
jge 0x40e453
mov dword [esp + 0x14], eax
mov esi, eax
lea ecx, [esp + 0x13]
push 1
push ecx
mov ecx, ebx
call fcn.0040b880
mov al, byte [esp + 0x13]
test al, 1
je 0x40e5df
mov edx, esi
mov eax, dword [ebx + 0x1c4]
imul edx, ebp
push edx
push eax
mov ecx, ebx
call fcn.0040b880
mov eax, dword [esp + 0x28]
mov ecx, dword [ebx + 0x1c4]
add esi, eax
mov dword [esp + 0x20], ecx
cmp eax, esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x58], esi
jge 0x40e928
mov ecx, dword [esp + 0x18]
lea eax, [ecx + ebp]
mov dword [esp + 0x70], eax
jmp 0x40e4b2
mov ecx, dword [esp + 0x18]
cmp ecx, eax
mov dword [esp + 0x2c], ecx
jge 0x40e5c9
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
mov ebp, dword [esp + 0x48]
and edx, 0xff
and ecx, 0xff
mov dword [esp + 0x4c], edx
mov edx, dword [esp + 0x44]
and edx, 0xff
and eax, 0xffff
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x3c]
and ebp, 0xffff
and edx, 0xffff
mov dword [esp + 0x64], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], edx
jmp 0x40e517
mov ecx, dword [esp + 0x64]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x20]
mov dl, byte [edx]
mov byte [esp + 0x7c], dl
mov esi, dword [esp + 0x7c]
and esi, 0xff
mov edx, esi
shr edx, cl
mov ecx, dword [esp + 0x4c]
and edx, eax
mov eax, edx
shl eax, 8
sub eax, edx
cdq
idiv dword [esp + 0x34]
mov edx, esi
shr edx, cl
mov ecx, dword [esp + 0x54]
shr esi, cl
mov ecx, dword [esp + 0x1c]
and edx, ebp
and esi, ecx
and eax, 0xff
or ah, 2
shl eax, 8
mov dword [esp + 0x5c], eax
mov eax, edx
shl eax, 8
sub eax, edx
cdq
idiv ebp
mov edx, dword [esp + 0x5c]
and eax, 0xff
or edx, eax
mov eax, esi
shl eax, 8
shl edx, 8
sub eax, esi
mov dword [esp + 0x5c], edx
cdq
idiv ecx
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x2c]
and eax, 0xff
or ecx, eax
mov eax, dword [ebx + 0x3a20]
push ecx
push edx
push esi
push eax
call dword [sym.imp.GDI32.dll_SetPixelV]
mov eax, dword [esp + 0x20]
inc eax
inc esi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x70]
cmp esi, eax
mov dword [esp + 0x2c], esi
jl 0x40e50f
mov esi, dword [esp + 0x58]
mov ecx, dword [esp + 0x14]
inc ecx
cmp ecx, esi
mov dword [esp + 0x14], ecx
jl 0x40e4ae
jmp 0x40e928
test al, 2
je 0x40e694
lea ecx, [esp + 0x78]
push 1
push ecx
mov ecx, ebx
call fcn.0040b880
mov esi, dword [esp + 0x78]
mov eax, dword [esp + 0x48]
mov cl, byte [esp + 0x40]
mov ebp, dword [esp + 0x38]
and esi, 0xff
and eax, 0xffff
mov edx, esi
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x3c]
and ebp, 0xffff
shr edx, cl
and eax, 0xffff
mov cl, byte [esp + 0x30]
mov dword [esp + 0x1c], eax
and edx, ebp
mov eax, edx
shl eax, 8
sub eax, edx
cdq
idiv ebp
mov edx, esi
shr edx, cl
mov ecx, dword [esp + 0x2c]
and edx, ecx
mov ebp, eax
mov eax, edx
shl eax, 8
sub eax, edx
and ebp, 0xff
cdq
idiv ecx
mov cl, byte [esp + 0x44]
or ebp, 0x200
shr esi, cl
mov ecx, dword [esp + 0x1c]
shl ebp, 8
and esi, ecx
and eax, 0xff
or ebp, eax
mov eax, esi
shl eax, 8
sub eax, esi
mov esi, dword [esp + 0x14]
cdq
idiv ecx
shl ebp, 8
and eax, 0xff
or ebp, eax
mov dword [esp + 0x84], ebp
jmp 0x40e69b
mov ebp, dword [esp + 0x84]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
push ebp
push esi
push edx
push eax
push ecx
mov ecx, ebx
call fcn.0040c900
test byte [esp + 0x13], 4
je 0x40e75d
lea edx, [esp + 0x80]
push 1
push edx
mov ecx, ebx
call fcn.0040b880
mov esi, dword [esp + 0x80]
mov cl, byte [esp + 0x40]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
and esi, 0xff
and edi, 0xffff
mov edx, esi
and eax, 0xffff
shr edx, cl
mov dword [esp + 0x1c], eax
mov cl, byte [esp + 0x30]
mov ebp, dword [esp + 0x48]
and ebp, 0xffff
and edx, edi
mov eax, edx
shl eax, 8
sub eax, edx
cdq
idiv edi
mov edx, esi
shr edx, cl
mov cl, byte [esp + 0x44]
shr esi, cl
mov ecx, dword [esp + 0x1c]
and edx, ebp
and esi, ecx
mov edi, eax
mov eax, edx
shl eax, 8
sub eax, edx
and edi, 0xff
cdq
idiv ebp
or edi, 0x200
shl edi, 8
and eax, 0xff
or edi, eax
mov eax, esi
shl eax, 8
sub eax, esi
cdq
idiv ecx
shl edi, 8
and eax, 0xff
or edi, eax
test byte [esp + 0x13], 8
je 0x40e928
lea eax, [esp + 0x24]
push 1
push eax
mov ecx, ebx
call fcn.0040b880
mov al, byte [esp + 0x13]
mov esi, dword [ebx + 0x1c4]
test al, 0x10
mov eax, dword [esp + 0x24]
je 0x40e8c3
and eax, 0xff
lea ecx, [eax + eax*2]
push ecx
push esi
mov ecx, ebx
call fcn.0040b880
mov al, byte [esp + 0x24]
mov dword [esp + 0x14], 0
test al, al
jbe 0x40e928
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x40]
and eax, 0xff
mov edi, dword [esp + 0x38]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x48]
and eax, 0xffff
and ecx, 0xff
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x44]
and eax, 0xff
and edi, 0xffff
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x3c]
and eax, 0xffff
mov dword [esp + 0x64], ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], eax
jmp 0x40e80b
mov ecx, dword [esp + 0x64]
mov edi, dword [esp + 0x34]
xor edx, edx
mov dl, byte [esi]
mov ebp, edx
shr edx, cl
mov ecx, dword [esp + 0x4c]
and edx, edi
mov eax, edx
shl eax, 8
sub eax, edx
cdq
idiv edi
mov edx, ebp
shr edx, cl
mov ecx, dword [esp + 0x2c]
and edx, ecx
mov edi, eax
mov eax, edx
shl eax, 8
sub eax, edx
and edi, 0xff
cdq
idiv ecx
mov ecx, dword [esp + 0x54]
or edi, 0x200
shr ebp, cl
mov ecx, dword [esp + 0x1c]
shl edi, 8
and ebp, ecx
and eax, 0xff
or edi, eax
mov eax, ebp
shl eax, 8
sub eax, ebp
cdq
idiv ecx
shl edi, 8
and eax, 0xff
or edi, eax
inc esi
xor eax, eax
push edi
mov al, byte [esi]
mov edx, eax
and eax, 0xf
shr edx, 4
mov ebp, eax
inc esi
xor eax, eax
mov al, byte [esi]
mov ecx, eax
and eax, 0xf
shr ecx, 4
inc ecx
inc eax
push eax
mov eax, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x24]
add ebp, eax
add edx, ecx
push ebp
push edx
mov ecx, ebx
inc esi
call fcn.0040c900
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
inc eax
and edx, 0xff
cmp eax, edx
mov dword [esp + 0x14], eax
jl 0x40e803
jmp 0x40e928
and eax, 0xff
mov ecx, ebx
shl eax, 1
push eax
push esi
call fcn.0040b880
mov al, byte [esp + 0x24]
xor ebp, ebp
test al, al
jbe 0x40e928
xor eax, eax
push edi
mov al, byte [esi]
mov edx, eax
and eax, 0xf
shr edx, 4
mov dword [esp + 0x5c], eax
inc esi
xor eax, eax
mov al, byte [esi]
mov ecx, eax
and eax, 0xf
shr ecx, 4
inc ecx
inc eax
push eax
mov eax, dword [esp + 0x60]
push ecx
mov ecx, dword [esp + 0x34]
add eax, ecx
mov ecx, dword [esp + 0x24]
add edx, ecx
push eax
push edx
mov ecx, ebx
inc esi
call fcn.0040c900
mov edx, dword [esp + 0x24]
inc ebp
and edx, 0xff
cmp ebp, edx
jl 0x40e8dd
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x60]
mov ecx, dword [esp + 0x68]
add eax, 0x10
sub edx, 0x10
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x60], edx
jl 0x40e427
mov esi, dword [esp + 0xa8]
mov ebp, dword [esp + 0x74]
lea ecx, [esp + 0x88]
mov byte [esp + 0xa0], 1
call fcn.00408d90
lea ecx, [esp + 0x90]
mov byte [esp + 0xa0], 0
call fcn.00408d40
lea ecx, [esp + 0x6c]
mov dword [esp + 0xa0], 0xffffffff
call fcn.00408cd0
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x50]
add eax, 0x10
sub edx, 0x10
cmp eax, ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x50], edx
jl 0x40e3ab
pop edi
pop esi
mov ecx, dword [esp + 0x90]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x94
ret 0x10