Function at 0x40afe7
Capabilities:
Set current directory

Disassembly:
call section..text
mov rax, rsp
shr rax, 4
jae 0x40aff7
push 0
sub rsp, 0x80
call fcn.0040af34
test eax, eax
je 0x40b0b3
cmp qword [0x0040105b], 0
je 0x40b054
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b053
push 0x1c
call fcn.0040b048
push rdx
jne 0x40b09d
outsb dx, byte [rsi]
imul ebp, dword [rsi + 0x67], 0x20736120
jne 0x40b0ac
jb 0x40b05c
jo 0x40b0b0
outsd dx, dword [rsi]
invalid
pop rax
cmp qword [0x0040105b], 0
je 0x40b0a9
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b0a8
push 0x28
call 0x40b09d
push rbx
imul esp, dword [rdi + 0x6e], 0x57206c61
imul ebp, dword [rsi + 0x64], 0x2073776f
je 0x40b0f5
and byte [rbx + 0x74], dh
invalid
push qword [0x0040105b]
call fcn.004020bf
pop rax
call fcn.0040aeb7
jmp 0x40b149
invalid
add byte [rax], al
add byte [rax - 0x7d], cl
cmp eax, 0xffff5fa0
add byte [rdx + rdi + 0x50], dh
cmp qword [0x0040105b], 0
je 0x40b0f7
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b0f6
push 0x17
call 0x40b0eb
push rdx
jne 0x40b145
outsb dx, byte [rsi]
imul ebp, dword [rsi + 0x67], 0x20736120
jae 0x40b146
jb 0x40b159
imul esp, dword [rbx + 0x65], 0xd2e2e2e
or bh, bh
xor eax, 0xffff5f6a
call fcn.004020bf
call [rax + 0x48]
cmp dword [0x0040105b], 0
pop rax
cmp qword [0x0040105b], 0
je 0x40b13c
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b13b
push 0x18
call 0x40b130
push rbx
je 0x40b17c
jb 0x40b191
imul ebp, dword [rsi + 0x67], 0x73694420
jo 0x40b187
je 0x40b18b
push 0x2e2e7265
or eax, 0x2535ff0a
pop rdi
invalid
pop rax
mov rcx, 0x40a967
call qword [sym.imp.ADVAPI32.DLL_StartServiceCtrlDispatcherW]
invalid
or byte [rax], al
add al, ch
retf 0xff5e
call fcn.00401018
ret
call section..text
cmp qword [0x0040105b], 0
je 0x40b1a3
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b1a2
push 0x18
call 0x40b197
jae 0x40b1e6
add byte [rax], al
add byte [rbx + 0x65], dh
jb 0x40b1f9
imul esp, dword [rbx + 0x65], 0x69616d5f
outsb dx, byte [rsi]
insd dword [rdi], dx
invalid
and byte [rcx + 0x73], ch
and byte [rbx + 0x61], ah
insb byte [rdi], dx
insb byte [rdi], dx
or eax, 0xbe35ff0a
pop rsi
invalid
pop rax
call fcn.004015a4
push 0xfffe
call fcn.004019a8
mov rbx, rax
push 0
push 0
mov rcx, rsp
mov rax, rsp
shr rax, 4
jae 0x40b1c7
push 0
sub rsp, 0x80
cmp qword [0x0040105b], 0
je 0x40b21b
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b21a
push 0x20
call 0x40b20f
push rdx
imul esi, dword gs:[ebx + 0x74], 0x6e697265
and byte [ebx + 0x65], dl
jb 0x40b275
imul esp, dword [rbx + 0x65], 0x6e614820
insb byte [rdi], dx
jb 0x40b239
or eax, 0x4635ff0a
pop rsi
invalid
pop rax
mov rdx, 0x40b2d3
call qword [sym.imp.ADVAPI32.DLL_RegisterServiceCtrlHandlerW]
mov qword [0x0040aaf5], rax
push 2
call fcn.0040ae4b
mov r8, 0x7fff
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
lea rdi, [rbx + 0xfffc]
xor ecx, ecx
dec rcx
mov eax, 0x5c
std
repne scasw ax, word [rdi]
cld
mov word [rdi + 4], 0
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
push rbx
call fcn.00401aae
cmp qword [0x0040105b], 0
je 0x40b2bd
invalid
cmp eax, 0xffff5de0
add byte [rax + rax*2 + 0x50], dh
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b2bc
push 0x1d
call 0x40b2b1
jne 0x40b309
jb 0x40b2fe
outsb dx, byte [rsi]
je 0x40b2bc
imul r14d, dword [rdx + 0x65], 0x726f7463
jns 0x40b2c6
imul esi, dword [rbx + 0x20], 0x2e746573
or eax, 0xa435ff0a
pop rbp
invalid
pop rax
call fcn.00409c1d
push 4
call fcn.0040ae4b
xor eax, eax
inc eax
call fcn.00401018
ret
sti
invalid
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b363
invalid
push 0
call 0x40b318
or eax, 0x16a000a
push rcx
push 1
call fcn.0040b33b
push rdx
invalid
pop rax
add rsp, 0x60
push 3
call fcn.0040ae4b
cmp qword [0x0040105b], 0
je 0x40b3bf
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b3be
push 0x23
call 0x40b3b3
push rbx
imul esp, dword [rdi + 0x6e], 0x6c206c61
imul esi, dword [rbx + 0x74], 0x65736e65
jae 0x40b414
imul ebp, dword [rdi + 0x6e], 0x6f742073
and byte [rbx + 0x74], dh
outsd dx, dword [rsi]
jo 0x40b3ce
or eax, 0xa235ff0a
pop rsp
invalid
pop rax
call fcn.00409364
cmp qword [0x0040105b], 0
je 0x40b419
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b418
push 0x28
call fcn.0040b40d
push rdi
invalid
cmpsd dword [rsi], dword [rdi]
insb byte [rdi], dx
invalid
pop rax
push qword [0x0040979f]
call fcn.00404a5d
test eax, eax
je 0x40b434
push 0x3e8
call fcn.00401e6e
jmp 0x40b419
cmp qword [0x0040105b], 0
je 0x40b489
push rax
push rax
mov eax, 1
and eax, dword [0x0040104f]
pop rax
je 0x40b488
push 0x28
call 0x40b47d
outsd dx, dword [rsi]
outsb dx, byte [rsi]
and byte cs:[rsi + rdx*2 + 0x27], dl
jae 0x40b480
jae 0x40b4c7
jb 0x40b4da
jb 0x40b487
push 0x62207361
outsb dx, byte gs:[rsi]
and byte [rbx + 0x68], dh
jne 0x40b4e8
outsd dx, dword fs:[rsi]
ja 0x40b4e6
or eax, 0xd835ff0a
pop rbx
invalid
call [rax + 0x6a]
add eax, ebp
mov ebx, 0xb8fffff9
add dword [rax], eax
add byte [rax], al
pop rax
push 1
call fcn.0040ae4b
mov eax, 1
call fcn.00401018
ret
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
push r10
xor r14, qword [rdx]
add byte cs:[rcx + 0x44], r8b
push rsi
push r8
push rax
xor rsi, qword [r10]
add byte cs:[rax], r8b
add byte [rax], al
add byte [rax], al
add byte [rax], al
mov sil, 0
add byte [rax], al
add byte [rax], al
add byte [rsi - 0x4a], dl
add byte [rax], al
add byte [rax], al
add byte [rax], al
mov dh, 0
add byte [rax], al
add byte [rax], al
add byte [rsi + rsi*4], dh
add byte [rax], al
add byte [rax], al
add byte [rdx + 0xb6], al
add byte [rax], al
add byte [rsi + rsi*4], dl
add byte [rax], al
test al, 0xb6
add byte [rax], al
add byte [rax], al
add byte [rax], al
mov esi, 0xb6
add byte [rax], al
add dh, cl
mov dh, 0
add byte [rax], al
add byte [rax], al
add ah, ah
mov dh, 0
add byte [rax], al
add byte [rax], al
add dh, dh
mov dh, 0
add byte [rax], al
add byte [rax], al
add byte [rax], dl
mov bh, 0
add byte [rax], al
add byte [rax], al
add byte [rax], ah
mov bh, 0
add byte [rax], al
add byte [rax], al
add byte [rax], bh
mov bh, 0
add byte [rax], al
add byte [rax], al
add byte [rdx - 0x49], cl
add byte [rax], al
add byte [rax], al
add byte [rax], al
push rdx
mov bh, 0
add byte [rax], al
add byte [rax], al
add byte [rdi + rsi*4], dh
add byte [rax], al
add byte [rax], al
add byte [rdi + rsi*4], al
add byte [rax], al
xchg edx, eax
mov bh, 0
add byte [rax], al
add byte [rax], al
add byte [rdx + 0xb7], ah
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax], al
add byte [rax - 0x4a], cl
mov sil, 0
add byte [rax], al
add byte [rax], al
invalid