Function at 0x30018df7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
mov ebx, dword [ebp + 0x18]
push edi
xor edi, edi
test word [ebx + 0x2c], 0x2000
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
jne 0x30019330
push esi
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SaveDC]
push 5
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_SelectObject]
mov esi, dword [ebp + 0x1c]
push dword [esi + 0xc]
mov eax, dword [esi + 4]
push dword [esi + 8]
add eax, dword [ebp + 0x20]
push eax
push dword [esi]
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.USER32.dll_SetRect]
cmp dword [ebp + 0x24], edi
je 0x30018e5b
mov eax, dword [esi + 4]
add eax, dword [ebp + 0x24]
jmp 0x30018e5e
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebx + 0x84]
add dword [ebp - 0x24], ecx
mov ecx, dword [ebx + 0x80]
add dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebx + 0x88]
sub eax, dword [ebx + 0x8c]
test word [ebx + 0x2c], 0x1000
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], eax
je 0x30018e9f
test byte [ebx + 0xf4], 0x10
jne 0x30018e9f
add eax, dword [ebx + 0x100]
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 0x2c], edi
jne 0x30018f1e
mov eax, dword [ebx + 0x130]
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
xor edx, edx
cmp eax, edx
movsd dword es:[edi], dword [esi]
jle 0x30018ef3
cmp eax, 3
jle 0x30018ee3
cmp eax, 4
jne 0x30018ef3
cmp dword [ebx + 0x70], 1
jne 0x30018f09
cmp dword [ebx + 0x13c], edx
je 0x30018ed6
dec ecx
mov dword [ebp - 0x10], ecx
cmp dword [ebx + 0x140], edx
jle 0x30018f09
dec dword [ebp - 0xc]
jmp 0x30018f09
cmp dword [ebx + 0x70], 1
jne 0x30018f09
cmp dword [ebx + 0x13c], edx
jle 0x30018ed6
jmp 0x30018ed2
mov eax, dword [ebx + 0x70]
cdq
sub eax, edx
sar eax, 1
neg eax
push eax
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.USER32.dll_InflateRect]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_ExcludeClipRect]
mov eax, dword [ebx + 0x130]
xor edi, edi
inc edi
cmp eax, edi
je 0x30019245
cmp eax, 2
je 0x30019192
cmp eax, 3
je 0x300190c9
cmp eax, 4
je 0x30018fe5
jle 0x30019308
cmp eax, 8
jle 0x30018fda
cmp eax, 9
jne 0x30019308
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 1
push dword [ebx + 0x134]
movsd dword es:[edi], dword [esi]
call fcn.300687fc
push eax
push dword [ebx + 0x70]
xor esi, esi
push esi
call fcn.30068953
push esi
push dword [ebx + 0x138]
mov dword [ebp - 4], eax
call fcn.300687fc
push eax
push dword [ebx + 0x78]
push esi
call fcn.30068953
push dword [ebx + 0x140]
mov dword [ebp - 8], eax
push dword [ebx + 0x13c]
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
push 1
push dword [ebp + 0x2c]
lea eax, [ebp - 0x18]
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 4]
push dword [ebx + 0x70]
push eax
push ebx
push dword [ebp + 8]
call fcn.30017425
jmp 0x30019308
mov dword [0x30075988], edi
jmp 0x30019308
push edi
push dword [ebx + 0x134]
call fcn.300687fc
push eax
push dword [ebx + 0x70]
push 0
call fcn.30068953
mov esi, dword [ebx + 0x13c]
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x140]
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
mov eax, esi
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
mov dword [ebp + 0x18], eax
jg 0x30019023
mov dword [ebp + 0x18], ecx
test esi, esi
jle 0x3001902c
mov dword [ebp + 0x10], edi
jmp 0x30019036
xor eax, eax
test esi, esi
setl al
mov dword [ebp + 0x10], eax
and dword [ebp + 0x24], 0
cmp dword [ebp + 0x18], 0
jle 0x30019308
push dword [ebp + 0x24]
push dword [ebp + 0x18]
push dword [ebx + 0x140]
push dword [ebp + 8]
call fcn.300688a5
push dword [ebp + 0x24]
mov dword [ebp + 0x1c], eax
push dword [ebp + 0x18]
push dword [ebx + 0x13c]
push dword [ebp + 8]
call fcn.300688a5
push dword [ebp + 0x1c]
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp + 0x20], eax
xor esi, esi
push esi
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
cmp dword [ebp + 0x10], esi
je 0x3001909f
mov eax, dword [ebp + 0x20]
cdq
xor eax, edx
sub eax, edx
add dword [ebp - 0x10], eax
sub dword [ebp - 0x18], eax
push 1
push dword [ebp + 0x2c]
lea eax, [ebp - 0x18]
push esi
push esi
push dword [ebp - 4]
push dword [ebx + 0x70]
push eax
push ebx
push dword [ebp + 8]
call fcn.30017425
inc dword [ebp + 0x24]
mov eax, dword [ebp + 0x24]
cmp eax, dword [ebp + 0x18]
jl 0x30019044
jmp 0x30019308
push edi
push dword [ebx + 0x134]
call fcn.300687fc
push eax
push dword [ebx + 0x70]
xor esi, esi
push esi
call fcn.30068953
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x140]
cdq
mov ecx, eax
mov eax, dword [ebx + 0x13c]
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
mov dword [ebp + 0x18], eax
jg 0x30019106
mov dword [ebp + 0x18], ecx
cmp dword [ebp + 0x18], esi
mov dword [ebp + 0x24], esi
jle 0x30019308
push dword [ebp + 0x24]
push dword [ebp + 0x18]
push dword [ebx + 0x140]
push dword [ebp + 8]
call fcn.300688a5
push dword [ebp + 0x24]
mov dword [ebp + 0x1c], eax
push dword [ebp + 0x18]
push dword [ebx + 0x13c]
push dword [ebp + 8]
call fcn.300688a5
push dword [ebp + 0x1c]
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebp + 0x20], eax
xor esi, esi
push esi
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [ebp + 0x20]
push 1
push dword [ebp + 0x2c]
cdq
push esi
push esi
push dword [ebp - 4]
xor eax, edx
push dword [ebx + 0x70]
sub eax, edx
add dword [ebp - 0x18], eax
sub dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
push ebx
push dword [ebp + 8]
call fcn.30017425
inc dword [ebp + 0x24]
mov eax, dword [ebp + 0x24]
cmp eax, dword [ebp + 0x18]
jl 0x30019112
jmp 0x30019308
push edi
push dword [ebx + 0x134]
call fcn.300687fc
push eax
push dword [ebx + 0x70]
xor esi, esi
push esi
call fcn.30068953
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x140]
cdq
mov ecx, eax
mov eax, dword [ebx + 0x13c]
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
cmp eax, ecx
mov dword [ebp + 0x18], eax
jg 0x300191cf
mov dword [ebp + 0x18], ecx
cmp dword [ebp + 0x18], esi
mov dword [ebp + 0x24], esi
jle 0x30019308
push dword [ebp + 0x24]
lea esi, [ebp - 0x28]
push dword [ebp + 0x18]
lea edi, [ebp - 0x18]
push dword [ebx + 0x140]
movsd dword es:[edi], dword [esi]
push dword [ebp + 8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.300688a5
push dword [ebp + 0x24]
mov edi, dword [ebp + 0x18]
push edi
push dword [ebx + 0x13c]
mov esi, eax
push dword [ebp + 8]
call fcn.300688a5
push esi
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
push 1
push dword [ebp + 0x2c]
lea eax, [ebp - 0x18]
push 0
push 0
push dword [ebp - 4]
push dword [ebx + 0x70]
push eax
push ebx
push dword [ebp + 8]
call fcn.30017425
inc dword [ebp + 0x24]
cmp dword [ebp + 0x24], edi
jl 0x300191db
jmp 0x30019308
mov eax, dword [ebx + 0x13c]
test eax, eax
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jle 0x30019267
mov esi, dword [ebx + 0x70]
mov eax, esi
cdq
sub eax, edx
sar eax, 1
sub esi, eax
jmp 0x30019279
jge 0x30019277
mov eax, dword [ebx + 0x70]
cdq
sub eax, edx
sar eax, 1
mov esi, eax
neg esi
jmp 0x30019279
xor esi, esi
mov ecx, dword [ebx + 0x140]
test ecx, ecx
jle 0x30019293
mov edi, dword [ebx + 0x70]
mov eax, edi
cdq
sub eax, edx
sar eax, 1
sub edi, eax
mov eax, edi
jmp 0x300192a3
jge 0x300192a1
mov eax, dword [ebx + 0x70]
cdq
sub eax, edx
sar eax, 1
neg eax
jmp 0x300192a3
xor eax, eax
add ecx, eax
mov eax, dword [ebx + 0x13c]
push ecx
add eax, esi
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.USER32.dll_OffsetRect]
mov eax, dword [ebx + 0x134]
push 1
push eax
call fcn.300687fc
xor ecx, ecx
cmp dword [0x30096804], ecx
je 0x300192e8
cmp dword [ebp + 0x28], ecx
jne 0x300192e8
cmp dword [0x300967fc], ecx
jne 0x300192e8
push eax
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_GetNearestColor]
fld qword [ebx + 0x124]
push 1
push dword [ebx + 0x70]
push eax
lea eax, [ebp - 0x18]
push eax
push ecx
push ecx
fstp qword [esp]
push dword [ebp + 0x2c]
push dword [ebp + 8]
call fcn.300181c2
push 0xffffffffffffffff
push dword [ebp + 8]
call dword [sym.imp.GDI32.dll_RestoreDC]
cmp dword [ebp - 4], 0
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
je 0x30019324
push dword [ebp - 4]
call esi
cmp dword [ebp - 8], 0
je 0x3001932f
push dword [ebp - 8]
call esi
pop esi
pop edi
pop ebx
leave
ret 0x28