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

Disassembly:
push 0xffffffffffffffff
push 0x43b0e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x84
push ebx
push ebp
mov ebx, ecx
push 0x2000
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 + 0xa0]
mov byte [esp + 0x38], cl
mov ecx, dword [esp + 0xa8]
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 0x40f71c
mov eax, dword [esp + 0xa4]
push esi
mov esi, dword [esp + 0x68]
push edi
mov edi, dword [esp + 0xa4]
mov dword [esp + 0x58], ecx
lea edx, [edi + 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 + 0x94]
mov dword [esp + 0xa4], 0
call fcn.00408d20
mov edx, dword [ebx + 0x3a24]
mov eax, dword [ebx + 0x3a20]
push edx
push eax
lea ecx, [esp + 0x8c]
call fcn.00408d60
mov eax, dword [esp + 0x68]
mov byte [esp + 0x9c], 2
cmp edi, eax
mov dword [esp + 0x18], edi
jge 0x40f6d0
mov eax, dword [esp + 0xac]
mov dword [esp + 0x60], eax
jmp 0x40f1b3
mov eax, dword [esp + 0x60]
mov ebp, 0x10
mov edi, ebp
cmp eax, ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], edi
jge 0x40f1cc
mov dword [esp + 0x20], eax
mov edi, eax
mov eax, dword [esp + 0x58]
cmp eax, 0x10
jge 0x40f1db
mov dword [esp + 0x14], eax
mov ebp, eax
lea ecx, [esp + 0x13]
push 1
push ecx
mov ecx, ebx
call fcn.0040b880
mov al, byte [esp + 0x13]
test al, 1
je 0x40f361
mov edx, ebp
mov eax, dword [ebx + 0x1c4]
imul edx, edi
shl edx, 2
push edx
push eax
mov ecx, ebx
call fcn.0040b880
mov eax, dword [esp + 0x28]
mov ecx, dword [ebx + 0x1c4]
add ebp, eax
mov dword [esp + 0x20], ecx
cmp eax, ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x50], ebp
jge 0x40f6a3
mov ecx, dword [esp + 0x18]
lea eax, [edi + ecx]
mov dword [esp + 0x78], eax
jmp 0x40f23d
mov ecx, dword [esp + 0x18]
cmp ecx, eax
mov dword [esp + 0x2c], ecx
jge 0x40f34b
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 + 0x64], edx
mov edx, dword [esp + 0x3c]
and ebp, 0xffff
and edx, 0xffff
mov dword [esp + 0x54], ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x1c], edx
jmp 0x40f2a2
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x20]
mov edi, dword [edx]
mov edx, edi
shr edx, cl
mov ecx, dword [esp + 0x4c]
and edx, eax
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div dword [esp + 0x34]
mov edx, edi
shr edx, cl
mov ecx, dword [esp + 0x64]
shr edi, cl
mov ecx, dword [esp + 0x1c]
and edx, ebp
and edi, ecx
and eax, 0xff
or ah, 2
shl eax, 8
mov dword [esp + 0x5c], eax
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div ebp
mov edx, dword [esp + 0x5c]
and eax, 0xff
or edx, eax
mov eax, edi
shl edx, 8
shl eax, 8
mov dword [esp + 0x5c], edx
sub eax, edi
xor edx, edx
mov edi, dword [esp + 0x2c]
div ecx
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x14]
and eax, 0xff
or ecx, eax
mov eax, dword [ebx + 0x3a20]
push ecx
push edx
push edi
push eax
call dword [sym.imp.GDI32.dll_SetPixelV]
mov eax, dword [esp + 0x20]
add eax, 4
inc edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x78]
cmp edi, eax
mov dword [esp + 0x2c], edi
jl 0x40f29a
mov ebp, dword [esp + 0x50]
mov ecx, dword [esp + 0x14]
inc ecx
cmp ecx, ebp
mov dword [esp + 0x14], ecx
jl 0x40f239
jmp 0x40f6a3
test al, 2
je 0x40f413
lea ecx, [esp + 0x70]
push 4
push ecx
mov ecx, ebx
call fcn.0040b880
mov ebp, dword [esp + 0x70]
mov eax, dword [esp + 0x48]
mov cl, byte [esp + 0x40]
mov edi, dword [esp + 0x38]
mov edx, ebp
and eax, 0xffff
shr edx, cl
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x3c]
and edi, 0xffff
and eax, 0xffff
mov dword [esp + 0x1c], eax
mov cl, byte [esp + 0x30]
and edx, edi
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div 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
xor edx, edx
div ecx
mov cl, byte [esp + 0x44]
and edi, 0xff
shr ebp, cl
mov ecx, dword [esp + 0x1c]
or edi, 0x200
shl edi, 8
xor edx, edx
and ebp, ecx
and eax, 0xff
or edi, eax
mov eax, ebp
shl eax, 8
sub eax, ebp
mov ebp, dword [esp + 0x14]
div ecx
shl edi, 8
and eax, 0xff
or edi, eax
mov dword [esp + 0x80], edi
jmp 0x40f41a
mov edi, dword [esp + 0x80]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
push edi
push ebp
push edx
push eax
push ecx
mov ecx, ebx
call fcn.0040c900
test byte [esp + 0x13], 4
je 0x40f4d3
lea edx, [esp + 0x7c]
push 4
push edx
mov ecx, ebx
call fcn.0040b880
mov edi, dword [esp + 0x7c]
mov cl, byte [esp + 0x40]
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov edx, edi
and esi, 0xffff
shr edx, cl
and eax, 0xffff
mov cl, byte [esp + 0x30]
mov dword [esp + 0x1c], eax
mov ebp, dword [esp + 0x48]
and ebp, 0xffff
and edx, esi
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div esi
mov edx, edi
shr edx, cl
mov cl, byte [esp + 0x44]
shr edi, cl
mov ecx, dword [esp + 0x1c]
and edx, ebp
and edi, ecx
mov esi, eax
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div ebp
and esi, 0xff
xor edx, edx
or esi, 0x200
shl esi, 8
and eax, 0xff
or esi, eax
mov eax, edi
shl eax, 8
sub eax, edi
div ecx
shl esi, 8
and eax, 0xff
or esi, eax
test byte [esp + 0x13], 8
je 0x40f6a3
lea eax, [esp + 0x24]
push 1
push eax
mov ecx, ebx
call fcn.0040b880
mov al, byte [esp + 0x13]
mov edi, dword [ebx + 0x1c4]
test al, 0x10
mov eax, dword [esp + 0x24]
je 0x40f63e
and eax, 0xff
lea ecx, [eax + eax*2]
shl ecx, 1
push ecx
push edi
mov ecx, ebx
call fcn.0040b880
mov al, byte [esp + 0x24]
mov dword [esp + 0x14], 0
test al, al
jbe 0x40f6a3
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x40]
and eax, 0xff
mov esi, 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 esi, 0xffff
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x3c]
and eax, 0xffff
mov dword [esp + 0x54], ecx
mov dword [esp + 0x34], esi
mov dword [esp + 0x1c], eax
jmp 0x40f583
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x34]
mov ebp, dword [edi]
add edi, 4
mov edx, ebp
shr edx, cl
mov ecx, dword [esp + 0x4c]
and edx, esi
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div esi
mov edx, ebp
shr edx, cl
mov ecx, dword [esp + 0x2c]
and edx, ecx
mov esi, eax
mov eax, edx
shl eax, 8
sub eax, edx
xor edx, edx
div ecx
mov ecx, dword [esp + 0x64]
and esi, 0xff
shr ebp, cl
mov ecx, dword [esp + 0x1c]
or esi, 0x200
shl esi, 8
xor edx, edx
and ebp, ecx
and eax, 0xff
or esi, eax
mov eax, ebp
shl eax, 8
sub eax, ebp
div ecx
shl esi, 8
and eax, 0xff
or esi, eax
xor eax, eax
mov al, byte [edi]
push esi
mov edx, eax
and eax, 0xf
shr edx, 4
mov ebp, eax
inc edi
xor eax, eax
mov al, byte [edi]
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 edi
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 0x40f57b
jmp 0x40f6a3
and eax, 0xff
mov ecx, ebx
shl eax, 1
push eax
push edi
call fcn.0040b880
mov al, byte [esp + 0x24]
xor ebp, ebp
test al, al
jbe 0x40f6a3
xor eax, eax
push esi
mov al, byte [edi]
mov edx, eax
and eax, 0xf
shr edx, 4
mov dword [esp + 0x54], eax
inc edi
xor eax, eax
mov al, byte [edi]
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 + 0x5c]
add ecx, eax
inc edi
push ecx
mov ecx, dword [esp + 0x28]
add edx, ecx
mov ecx, ebx
push edx
call fcn.0040c900
mov edx, dword [esp + 0x24]
inc ebp
and edx, 0xff
cmp ebp, edx
jl 0x40f658
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 0x40f1af
mov ebp, dword [esp + 0x74]
mov edi, dword [esp + 0xa4]
lea ecx, [esp + 0x84]
call fcn.00408d90
lea ecx, [esp + 0x8c]
call fcn.00408d40
lea ecx, [esp + 0x6c]
mov dword [esp + 0x9c], 0xffffffff
call fcn.00408cd0
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x58]
add eax, 0x10
sub edx, 0x10
cmp eax, ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x58], edx
jl 0x40f13b
pop edi
pop esi
mov ecx, dword [esp + 0x8c]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x90
ret 0x10