Function at 0x40d1d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e7460
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push esi
push edi
mov eax, dword [0x555ab0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 4], 0
mov esi, dword [ebp + 0xc]
mov byte [ebp - 0x11], 0
cmp dword [esi - 0xc], 0
jne 0x40d270
mov eax, dword [0x55e860]
imul eax, eax
cdq
mov ecx, 0xc
idiv ecx
cmp edx, 5
jne 0x40d239
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetMailslotInfo]
mov esi, dword [ebp + 0xc]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d25a
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 3
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
mov byte [ebp - 4], 4
push dword [ebp + 8]
call fcn.00410a30
mov esi, dword [0x55e860]
mov bl, al
mov eax, esi
imul eax, esi
imul eax, esi
cdq
mov ecx, 0x12
idiv ecx
cmp edx, 6
jne 0x40d2f2
lea ecx, [edx - 5]
cmp esi, ecx
jle 0x40d2ec
lea esp, [esp]
mov eax, esi
cdq
idiv ecx
inc ecx
add ecx, edx
cmp ecx, esi
jl 0x40d2e0
mov dword [0x55e860], ecx
test bl, bl
jne 0x40d669
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov eax, str.Query1nterf_cesFor__nd8ox_f_i1ed
mov byte [ebp - 4], 5
test eax, 0xffff0000
jne 0x40d337
movzx esi, ax
mov ecx, esi
call fcn.00401970
test eax, eax
je 0x40d344
push esi
push eax
lea ecx, [ebp - 0x28]
call fcn.00402420
jmp 0x40d344
push str.Query1nterf_cesFor__nd8ox_f_i1ed
lea ecx, [ebp - 0x28]
call fcn.004047f0
mov byte [ebp - 4], 6
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov eax, 0x52d690
mov byte [ebp - 4], 7
test eax, 0xffff0000
jne 0x40d385
movzx esi, ax
mov ecx, esi
call fcn.00401970
test eax, eax
je 0x40d394
push esi
push eax
lea ecx, [ebp + 8]
call fcn.00402420
jmp 0x40d394
push 0x11
push 0x52d690
lea ecx, [ebp + 8]
call fcn.004021b0
mov byte [ebp - 4], 8
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28]
push eax
lea edx, [ebp - 0x30]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 9
call fcn.00421a70
lea ecx, [ebp - 0x18]
push ecx
mov edx, eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0xa
call fcn.00421a70
add esp, 8
mov dword [ebp - 0x2c], eax
mov byte [ebp - 4], 0xb
mov ecx, dword [edi + 0x5c]
mov edx, dword [eax]
mov ebx, dword [ecx]
lea esi, [edx - 0x10]
sub ebx, 0x10
mov dword [ebp - 0x38], ecx
cmp esi, ebx
je 0x40d439
cmp dword [ebx + 0xc], 0
jl 0x40d42d
mov eax, dword [esi]
cmp eax, dword [ebx]
jne 0x40d42d
mov ecx, esi
call fcn.004022e0
or esi, 0xffffffff
mov dword [ebp - 0x34], eax
mov eax, esi
lea ecx, [ebx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40d41d
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
add eax, 0x10
mov dword [ecx], eax
mov eax, dword [ebp - 0x2c]
jmp 0x40d43c
push dword [edx - 0xc]
push edx
call fcn.004021b0
mov eax, dword [ebp - 0x2c]
or esi, 0xffffffff
mov ecx, dword [edi + 0x64]
test ecx, ecx
je 0x40d453
push 2
push eax
lea eax, [ebp + 8]
push eax
lea eax, [edi + 0x60]
push eax
call fcn.00402570
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d473
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d493
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d4b3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 6
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d4d3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x28]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d4f3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x52d6b4
push 0x52d6b8
lea ecx, [ebp - 0x18]
call fcn.004043a0
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov eax, 0x52d6bc
mov byte [ebp - 4], 0xc
test eax, 0xffff0000
jne 0x40d542
movzx ebx, ax
mov ecx, ebx
call fcn.00401970
test eax, eax
je 0x40d54f
push ebx
push eax
lea ecx, [ebp + 8]
call fcn.00402420
jmp 0x40d54f
push 0x52d6bc
lea ecx, [ebp + 8]
call fcn.004047f0
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp + 8]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xd
call fcn.004045e0
add esp, 4
mov byte [ebp - 4], 0xe
mov edx, dword [edi]
push eax
mov ecx, edi
call dword [edx + 0x50]
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d591
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d5b1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d5d1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40d5e2
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40d5f3
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40d604
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov bl, byte [ebp - 0x11]
mov eax, dword [0x55e860]
imul eax, eax
cdq
mov ecx, 0x18
idiv ecx
cmp edx, 0xe
jne 0x40d632
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x50
div ecx
inc edx
mov dword [0x55e860], edx
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp + 0xc]
add edi, 0xfffffff0
lea eax, [edi + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x40d653
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp - 0x20]
lea ecx, [edi + 0x68]
call fcn.00410f10
test al, al
jne 0x40d7ca
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov eax, str.This_is_not_top_1eve1_frame__not_executing_BG_code
mov byte [ebp - 4], 0xf
test eax, 0xffff0000
jne 0x40d6b9
movzx esi, ax
mov ecx, esi
call fcn.00401970
test eax, eax
je 0x40d6c6
push esi
push eax
lea ecx, [ebp - 0x28]
call fcn.00402420
jmp 0x40d6c6
push str.This_is_not_top_1eve1_frame__not_executing_BG_code
lea ecx, [ebp - 0x28]
call fcn.004047f0
mov byte [ebp - 4], 0x10
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov eax, str.runJ_Code0nWindow
mov byte [ebp - 4], 0x11
test eax, 0xffff0000
jne 0x40d707
movzx esi, ax
mov ecx, esi
call fcn.00401970
test eax, eax
je 0x40d716
push esi
push eax
lea ecx, [ebp + 8]
call fcn.00402420
jmp 0x40d716
push 0x11
push str.runJ_Code0nWindow
lea ecx, [ebp + 8]
call fcn.004021b0
mov byte [ebp - 4], 0x12
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
lea ebx, [eax + 0x10]
mov dword [ebp - 0x40], ebx
lea eax, [ebp - 0x28]
push eax
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 0x13
call fcn.00421a70
add esp, 4
mov byte [ebp - 4], 0x14
mov ecx, dword [edi + 0x64]
test ecx, ecx
je 0x40d75e
push 0
push eax
lea eax, [ebp + 8]
push eax
lea eax, [edi + 0x60]
push eax
call fcn.00402570
mov byte [ebp - 4], 0x13
mov edx, dword [ebp - 0x3c]
add edx, 0xfffffff0
or esi, 0xffffffff
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40d781
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [ebx - 0x10]
mov byte [ebp - 4], 0x12
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d79e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x10
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40d7be
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x28]
jmp 0x40d598
mov byte [ebp - 4], 0x15
mov eax, dword [ebp + 0xc]
push dword [eax - 0xc]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov ebx, eax
test ebx, ebx
jne 0x40d7e6
call fcn.00402350
mov ecx, dword [0x55e860]
mov eax, ecx
imul eax, ecx
imul eax, ecx
cdq
mov ecx, 0xe
idiv ecx
cmp edx, 2
jne 0x40d813
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
push 0x52d730
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [ebp + 8], eax
xor eax, eax
xorps xmm0, xmm0
mov word [ebp - 0x50], ax
movq qword [ebp - 0x4e], xmm0
mov dword [ebp - 0x46], eax
mov word [ebp - 0x42], ax
call fcn.0040ae20
test al, al
jne 0x40d8d7
mov edx, dword [0x55e860]
xor esi, esi
jmp 0x40d850
mov ecx, esi
and ecx, 1
dec ecx
not ecx
and ecx, edx
mov eax, esi
sar eax, 1
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, edx
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, edx
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, edx
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, edx
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, edx
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, edx
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, edx
sar ecx, 1
xor eax, ecx
add edx, eax
inc esi
mov dword [0x55e860], edx
cmp esi, 0x100
jl 0x40d850
mov eax, dword [ebp - 0x1c]
lea edx, [ebp - 0x50]
mov ecx, dword [eax]
push edx
push dword [ebp + 8]
push ebx
push eax
call dword [ecx + 0x110]
mov esi, eax
test esi, esi
je 0x40da90
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
push esi
lea eax, [ebp - 0x28]
push str.exec_script_failed__d
push eax
mov byte [ebp - 4], 0x16
call fcn.00404f10
mov eax, dword [0x5556d8]
add esp, 0xc
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
mov eax, str.runJ_CodeOnWindow
mov byte [ebp - 4], 0x17
test eax, 0xffff0000
jne 0x40d95b
movzx esi, ax
mov ecx, esi
call fcn.00401970
test eax, eax
je 0x40d96a
push esi
push eax
lea ecx, [ebp + 8]
call fcn.00402420
jmp 0x40d96a
push 0x11
push str.runJ_CodeOnWindow
lea ecx, [ebp + 8]
call fcn.004021b0
mov byte [ebp - 4], 0x18
mov eax, dword [0x5556d8]
mov ecx, 0x5556d8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x28]
push eax
lea edx, [ebp - 0x30]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 0x19
call fcn.00421a70
add esp, 4
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 0x1a
mov esi, dword [edi + 0x5c]
mov edx, dword [eax]
mov ebx, dword [esi]
lea ecx, [edx - 0x10]
sub ebx, 0x10
mov dword [ebp - 0x3c], esi
cmp ecx, ebx
je 0x40d9f7
cmp dword [ebx + 0xc], 0
jl 0x40d9ec
mov eax, dword [ecx]
cmp eax, dword [ebx]
jne 0x40d9ec
call fcn.004022e0
or esi, 0xffffffff
mov dword [ebp - 0x40], eax
mov eax, esi
lea ecx, [ebx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40d9df
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
add eax, 0x10
mov dword [ecx], eax
jmp 0x40d9fa
push dword [edx - 0xc]
mov ecx, esi
push edx
call fcn.004021b0
or esi, 0xffffffff
mov ecx, dword [edi + 0x64]
test ecx, ecx
je 0x40da13
push 2
push dword [ebp - 0x38]
lea eax, [ebp + 8]
push eax
lea eax, [edi + 0x60]
push eax
call fcn.00402570
mov byte [ebp - 4], 0x19
mov edx, dword [ebp - 0x34]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40da33
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x18
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40da53
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0x16
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
mov ecx, esi
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40da73
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [edi]
lea ecx, [ebp - 0x28]
push ecx
mov ecx, edi
call dword [eax + 0x50]
mov byte [ebp - 4], 0x15
mov edx, dword [ebp - 0x28]
jmp 0x40d598
mov dword [ebp - 4], 4
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
or esi, 0xffffffff
mov bl, 1
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40dabc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40dacd
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40dade
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40d607
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40d607