Function at 0x40f060
Capabilities:
Encrypt data using rc4 ksa
Terminate process

Disassembly:
sub esp, 0x234
mov ecx, dword [esp + 0x238]
push ebx
push ebp
push esi
lea eax, [esp + 0x14]
push edi
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
push 0xf
call dword [sym.imp.GDI32.dll_GetStockObject]
xor esi, esi
mov dword [esp + 0x10], eax
cmp eax, esi
je 0x40f181
mov edx, dword [esp + 0x1c]
lea eax, [edx*8 + 0x1f]
cdq
and edx, 0x1f
add eax, edx
mov ebx, eax
sar ebx, 5
imul ebx, dword [esp + 0x20]
shl ebx, 2
lea eax, [ebx + 0x428]
push eax
push 0x42
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
cmp eax, esi
mov dword [esp + 0x14], eax
je 0x40f181
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
mov ebp, eax
cmp ebp, esi
je 0x40f181
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov ecx, 0xa
lea esi, [esp + 0x3c]
mov edi, ebp
mov dword [esp + 0x3c], 0x28
mov dword [esp + 0x44], edx
mov word [esp + 0x48], 1
mov word [esp + 0x4a], 8
rep movsd dword es:[edi], dword [esi]
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
mov eax, dword [esp + 0x10]
push 0
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
mov edi, eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x248]
lea eax, [ebp + 0x428]
push 0
push ebp
push eax
push ecx
push 0
push edx
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x40f18e
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x234
ret
test edi, edi
je 0x40f1ac
push 1
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
push esi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x1c]
lea eax, [eax + eax*2]
push eax
call fcn.005096c2
mov edi, dword [esp + 0x24]
mov esi, eax
mov eax, ebx
xor edx, edx
div edi
lea edx, [edi - 1]
add esp, 4
test edx, edx
mov dword [esp + 0x38], esi
mov ecx, esi
jl 0x40f23d
mov edi, edx
mov ebx, eax
imul edi, eax
lea eax, [ebp + 0x428]
neg ebx
add edi, eax
mov eax, dword [esp + 0x1c]
inc edx
mov dword [esp + 0x10], edx
xor esi, esi
test eax, eax
jle 0x40f22c
mov dl, byte [edi + esi]
mov byte [esp + 0x34], dl
mov eax, dword [esp + 0x34]
and eax, 0xff
inc ecx
inc ecx
mov dl, byte [ebp + eax*4 + 0x2a]
lea eax, [ebp + eax*4 + 0x28]
mov byte [ecx - 2], dl
inc ecx
mov dl, byte [eax + 1]
inc esi
mov byte [ecx - 2], dl
mov al, byte [eax]
mov byte [ecx - 1], al
mov eax, dword [esp + 0x1c]
cmp esi, eax
jl 0x40f1fa
mov edx, dword [esp + 0x10]
add edi, ebx
dec edx
mov dword [esp + 0x10], edx
jne 0x40f1f4
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
lea ecx, [esp + 0x1c0]
push ecx
call fcn.004e2bd0
push 0x15b
lea edx, [esp + 0x6c]
push 0x3e
push edx
mov dword [esp + 0x74], eax
call fcn.004e1b30
mov edi, dword [esp + 0x25c]
push 0x565514
push edi
call fcn.004a68bf
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x40f2a6
push edi
push str.cant_open__s_n
push 0x56a470
call fcn.004a66f2
add esp, 0xc
push 1
call fcn.004a65ff
lea eax, [esp + 0x64]
push ebx
push eax
call fcn.004e2aa0
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x6c]
mov dword [esp + 0x85], ecx
push eax
mov dword [esp + 0x8d], edx
mov dword [esp + 0x91], 3
mov dword [esp + 0x95], 2
call fcn.004e2270
mov ecx, dword [esp + 0x25c]
push 1
and ecx, 0xff
lea edx, [esp + 0x74]
push ecx
push edx
mov dword [esp + 0x12d], 0
call fcn.004e2250
lea eax, [esp + 0x7c]
push 1
push eax
call fcn.004e1ed0
mov eax, dword [esp + 0x9d]
mov ecx, dword [esp + 0xa1]
add esp, 0x20
lea edi, [eax + eax*2]
mov eax, dword [esp + 0x12a]
cmp eax, ecx
jae 0x40f366
imul eax, edi
lea ecx, [esp + 0x30]
push 1
lea edx, [esp + 0x68]
add eax, esi
push ecx
push edx
mov dword [esp + 0x3c], eax
call fcn.004e1f50
mov eax, dword [esp + 0x136]
mov ecx, dword [esp + 0x8d]
add esp, 0xc
cmp eax, ecx
jb 0x40f337
lea eax, [esp + 0x64]
push eax
call fcn.004e1c70
push ebx
call fcn.004a6555
lea ecx, [esp + 0x6c]
push ecx
call fcn.004e1c00
push esi
call fcn.005096eb
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x234
ret