Function at 0x403890
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x4ff94c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ecx + 0x120]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebx + 0x84]
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x28], ecx
xor edx, edx
mov dword [ebp - 0x2c], eax
call fcn.00403450
mov ebx, dword [ebx + 0x88]
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x2c]
add ebx, eax
sub edx, 3
cmp dword [ecx + 0x11c], 0
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], 2
mov dword [ebp - 8], edx
mov dword [ebp - 0x20], eax
je 0x40390a
cmp dword [section..data], 3
jne 0x40390a
add eax, 0xfffffffa
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
push 0xff
push edi
push esi
push 0
push 0x28
push ebx
push 0
call fcn.00402610
mov eax, dword [ebp - 0x20]
push 0xff
push edi
push esi
push 0
push 0x28
push ebx
push 1
call fcn.00402610
mov eax, dword [ebp - 0x20]
push 0xff
push edi
push esi
push 0
push 0x28
push ebx
push 2
call fcn.00402610
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + 0x120]
mov ecx, dword [eax + 0x80]
mov ebx, dword [ebp - 0x38]
add esp, 0x54
mov dword [ebp - 0x24], ecx
cmp ecx, dword [eax + 0x7c]
jge 0x40399f
lea edx, [ecx*8 + 0x98]
mov dword [ebp - 0x18], edx
cmp ebx, dword [ebp - 0x30]
jge 0x40399f
mov ecx, dword [ebp - 0x28]
mov ecx, dword [ecx + 0x120]
mov edx, dword [ebp - 0x18]
mov edx, dword [ecx + edx]
add edx, dword [ecx + 0x8c]
mov ecx, dword [ebp - 0x24]
add dword [ebp - 0x18], 8
inc ecx
add ebx, edx
mov dword [ebp - 0x24], ecx
cmp ecx, dword [eax + 0x7c]
jl 0x403973
add ebx, dword [eax + 0x8c]
mov eax, dword [ebp - 0x2c]
push 0xff
push edi
push esi
push 0
dec eax
push 0x5f
push ebx
mov dword [ebp - 0x44], eax
push eax
mov eax, dword [ebp - 0x20]
call fcn.00402610
mov eax, dword [ebp - 0x2c]
push 0xff
push edi
push esi
push 0
add eax, 0xfffffffe
push 0x5a
push ebx
mov dword [ebp - 0x48], eax
push eax
mov eax, dword [ebp - 0x20]
call fcn.00402610
mov eax, dword [ebp - 0x2c]
push 0xff
push edi
push esi
push 0
add eax, 0xfffffffd
push 0x50
push ebx
mov dword [ebp - 0x4c], eax
push eax
mov eax, dword [ebp - 0x20]
call fcn.00402610
mov eax, dword [ebp - 0x2c]
add esp, 0x54
push 0xff
push edi
push esi
push 0
add eax, 0xfffffffc
push 0x46
push ebx
mov dword [ebp - 0x54], eax
push eax
mov eax, dword [ebp - 0x20]
call fcn.00402610
mov eax, dword [ebp - 0x2c]
push 0xff
push edi
push esi
push 0
add eax, 0xfffffffb
push 0x32
push ebx
mov dword [ebp - 0x50], eax
push eax
mov eax, dword [ebp - 0x20]
call fcn.00402610
mov eax, dword [ebp - 0x2c]
push 0xff
push edi
push esi
push 0
add eax, 0xfffffffa
push 0x1e
push ebx
mov dword [ebp - 0x40], eax
push eax
mov eax, dword [ebp - 0x20]
call fcn.00402610
mov eax, dword [ebp - 0x2c]
add esp, 0x54
push 0x3f
add eax, 0xfffffff9
push edi
mov dword [ebp - 0x18], eax
push esi
push 0
push 0x5f
push ebx
push eax
mov eax, dword [ebp - 0x20]
call fcn.00402610
mov eax, 4
add esp, 0x1c
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x18], eax
jle 0x403ab7
jmp 0x403a90
mov eax, dword [ebp - 0x1c]
push 0xff
push edi
push esi
push 0
push 0x28
push ebx
push eax
mov eax, dword [ebp - 0x20]
call fcn.00402610
mov eax, dword [ebp - 0x1c]
inc eax
add esp, 0x1c
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0x18]
jl 0x403a90
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + 0x120]
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [eax + 0x7c]
jne 0x403b17
cmp ecx, dword [eax + 0x78]
jg 0x403b17
mov eax, dword [ebp - 0x20]
push 0xff
push edi
push esi
push 0
push 0x28
lea edx, [ebx + 1]
push edx
push 3
call fcn.00402610
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x120]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
add ebx, dword [ecx + edx*8 + 0x98]
push 0xff
push edi
push esi
push 0
push 0x28
push eax
lea eax, [ebx - 1]
push 3
call fcn.00402610
add esp, 0x38
jmp 0x403b33
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x20]
push 0xff
push edi
push esi
push 0
push 0x28
push ecx
push 3
call fcn.00402610
add esp, 0x1c
mov eax, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x18], eax
jle 0x403b69
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x1c]
push 0xff
push edi
push esi
push 0
push 0x28
push edx
push eax
mov eax, ebx
call fcn.00402610
mov eax, dword [ebp - 0x1c]
inc eax
add esp, 0x1c
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0x18]
jl 0x403b40
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x44]
push 0xff
push edi
push esi
push 0
push 0x5f
push ecx
push edx
mov eax, ebx
call fcn.00402610
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x48]
push 0xff
push edi
push esi
push 0
push 0x5a
push eax
push ecx
mov eax, ebx
call fcn.00402610
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x4c]
push 0xff
push edi
push esi
push 0
push 0x50
push edx
push eax
mov eax, ebx
call fcn.00402610
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x54]
add esp, 0x54
push 0xff
push edi
push esi
push 0
push 0x46
push ecx
push edx
mov eax, ebx
call fcn.00402610
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x50]
push 0xff
push edi
push esi
push 0
push 0x32
push eax
push ecx
mov eax, ebx
call fcn.00402610
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x40]
push 0xff
push edi
push esi
push 0
push 0x1e
push edx
push eax
mov eax, ebx
call fcn.00402610
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x18]
add esp, 0x54
push 0x3f
push edi
push esi
push 0
push 0x5f
push ecx
push edx
mov eax, ebx
call fcn.00402610
mov edx, dword [ebp - 0x28]
add esp, 0x1c
mov ecx, dword [edx + 0x120]
mov eax, dword [ecx + 0x8c]
mov ecx, dword [ecx + 0x80]
mov ebx, dword [edx + 0x120]
add eax, dword [ebp - 0x38]
mov dword [ebp - 0x24], ecx
cmp ecx, dword [ebx + 0x78]
jge 0x403f10
jmp 0x403c59
mov eax, dword [ebp - 0x40]
mov edx, ecx
mov ecx, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x30]
jge 0x403f10
mov edx, dword [edx + 0x120]
mov dword [ebp - 0x14], eax
add eax, dword [edx + ecx*8 + 0x98]
mov dword [ebp - 0xc], eax
add eax, dword [edx + 0x8c]
cmp ecx, dword [edx + 0x7c]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x40], eax
mov eax, ecx
jne 0x403cff
sub eax, dword [ebp - 0x10]
xor ebx, ebx
mov dword [ebp - 0x1c], eax
test eax, eax
jle 0x403cd8
imul eax, eax, 0x5a
mov dword [ebp - 0x18], eax
jmp 0x403ca3
mov eax, dword [ebp - 0x18]
cdq
idiv dword [ebp - 0x1c]
push 0xff
push edi
push esi
push 0
sub ecx, ebx
add eax, 0xa
push eax
mov eax, dword [ebp - 0xc]
dec eax
push eax
mov eax, dword [ebp - 0x14]
inc eax
push ecx
call fcn.00402610
sub dword [ebp - 0x18], 0x5a
mov ecx, dword [ebp - 8]
inc ebx
add esp, 0x1c
cmp ebx, dword [ebp - 0x1c]
jl 0x403ca0
mov eax, dword [ebp - 0x1c]
push 0x3f
push edi
push esi
mov ebx, ecx
push 0
add ecx, 0xfffffffd
push 0x4b
push ecx
mov ecx, dword [ebp - 0x14]
sub ebx, eax
lea eax, [ebx + 2]
push ecx
mov dword [ebp - 0x18], eax
call fcn.00402880
mov edx, dword [ebp - 8]
add edx, 0xfffffffd
jmp 0x403d61
sub eax, dword [ebp - 0x10]
mov ebx, 5
sub eax, 2
mov dword [ebp - 0x1c], eax
cmp eax, ebx
jle 0x403d3c
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
push 0xc8
push edi
push esi
push 0
push 0x3c
dec edx
push edx
sub ecx, ebx
inc eax
push ecx
call fcn.00402610
mov ecx, dword [ebp - 8]
inc ebx
add esp, 0x1c
cmp ebx, dword [ebp - 0x1c]
jl 0x403d11
mov eax, dword [ebp - 0x1c]
push 0x3f
push edi
push esi
mov ebx, ecx
push 0
add ecx, 0xfffffffa
push 0x4b
push ecx
mov ecx, dword [ebp - 0x14]
sub ebx, eax
lea eax, [ebx + 2]
push ecx
mov dword [ebp - 0x18], eax
call fcn.00402880
mov edx, dword [ebp - 8]
add edx, 0xfffffffa
mov eax, dword [ebp - 0xc]
push 0x3f
push edi
push esi
push 0
push 0x4b
push edx
push eax
mov eax, dword [ebp - 0x18]
call fcn.00402880
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
push 0x3f
push edi
push esi
push 0
push 0x4b
add ecx, 0xfffffffe
push ecx
push ebx
add eax, 2
call fcn.00402610
mov edx, dword [esi + 4]
mov eax, dword [ebp - 0x14]
inc ebx
imul edx, ebx
lea eax, [edx + eax + 1]
lea ecx, [edi + eax*2]
movzx edx, byte [ecx + eax + 2]
add ecx, eax
imul edx, edx, 0x4b
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, 0xf
mov byte [ecx + 2], al
movzx edx, byte [ecx + 1]
imul edx, edx, 0x4b
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, 0xf
mov byte [ecx + 1], al
movzx edx, byte [ecx]
imul edx, edx, 0x4b
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, 0xf
mov byte [ecx], al
mov ecx, dword [ebp - 0xc]
add esp, 0x54
cmp ecx, dword [ebp - 0x30]
jge 0x403e6a
mov eax, dword [esi + 4]
imul eax, ebx
add eax, ecx
lea ecx, [edi + eax*2]
movzx edx, byte [eax + ecx - 1]
lea ecx, [eax + ecx - 3]
imul edx, edx, 0x4b
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, 0xf
mov byte [ecx + 2], al
movzx edx, byte [ecx + 1]
imul edx, edx, 0x4b
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, 0xf
mov byte [ecx + 1], al
movzx edx, byte [ecx]
imul edx, edx, 0x4b
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
add al, 0xf
mov byte [ecx], al
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x120]
mov eax, dword [ebp - 0x24]
cmp eax, dword [edx + 0x7c]
je 0x403e8e
mov ebx, dword [ebp - 0x3c]
mov edx, dword [ebx]
mov eax, dword [edx + 0x38]
push 0x464646
mov ecx, ebx
call eax
jmp 0x403e9d
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x38]
push 0
call eax
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + 0x130]
test eax, eax
je 0x403eb5
mov edx, dword [ebx + 4]
push eax
push edx
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [0x50bbf8]
mov eax, dword [ebx]
mov edx, dword [eax + 0x30]
push ecx
mov ecx, ebx
call edx
push 1
mov ecx, ebx
call sub.mfc100u.dll_CDC::SetBkMode
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x120]
mov edx, dword [ebp - 0x24]
lea eax, [ecx + edx*8 + 0x94]
mov eax, dword [eax]
mov edx, dword [ebx]
mov edx, dword [edx + 0x70]
push 0x25
lea ecx, [ebp - 0x14]
push ecx
mov ecx, dword [eax - 0xc]
push ecx
push eax
mov ecx, ebx
call edx
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x120]
inc eax
mov dword [ebp - 0x24], eax
cmp eax, dword [edx + 0x78]
jl 0x403c51
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b7f56
mov esp, ebp
pop ebp
ret 0x14