Function at 0x40b89b
Capabilities:
Set current directory

Disassembly:
mov eax, 0x1444
call fcn.005c1580
mov eax, dword [0x6dad44]
xor eax, esp
mov dword [esp + 0x1440], eax
push ebx
push ebp
mov ebp, dword [esp + 0x1450]
lea ecx, [esp + 0x24]
push esi
mov esi, dword [0x76b524]
push edi
mov dword [esp + 0x18], edx
xor edi, edi
push 1
push 4
mov edx, 0x400
call fcn.00487604
mov ebx, eax
pop ecx
pop ecx
mov dword [esp + 0x14], ebx
cmp dword [ebx - 0xc], edi
jbe 0x40b8f3
mov eax, dword [ebx - 0x10]
add eax, 0x10
add eax, ebx
jmp 0x40b8f5
xor eax, eax
mov dword [eax], esi
mov eax, dword [esi + 0x40]
test eax, eax
je 0x40b904
push 2
call eax
jmp 0x40b90a
call dword [sym.imp.USER32.dll_SetProcessDPIAware]
cmp dword [esp + 0x18], 1
jne 0x40b942
mov eax, dword [ebp]
mov ecx, 0x6e0bb0
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40b939
test dl, dl
je 0x40b935
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40b939
add eax, 2
add ecx, 2
test dl, dl
jne 0x40b919
xor eax, eax
jmp 0x40b93e
sbb eax, eax
or eax, 1
test eax, eax
je 0x40b996
cmp dword [esp + 0x18], 2
jne 0x40ba0d
mov ecx, dword [ebp + 4]
mov edx, 0x6e0bb8
mov eax, ecx
mov bl, byte [eax]
cmp bl, byte [edx]
mov byte [esp + 0x13], bl
mov ebx, dword [esp + 0x14]
jne 0x40b98d
cmp byte [esp + 0x13], 0
je 0x40b989
mov bl, byte [eax + 1]
cmp bl, byte [edx + 1]
mov byte [esp + 0x13], bl
mov ebx, dword [esp + 0x14]
jne 0x40b98d
add eax, 2
add edx, 2
cmp byte [esp + 0x13], 0
jne 0x40b957
xor eax, eax
jmp 0x40b992
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40b9ad
mov edx, dword [esi + 0x18]
mov ecx, dword [esi]
call fcn.0047cf3a
and dword [esi], edi
mov dword [esi + 0xd34], eax
jmp 0x40bf03
mov eax, str.__netinfo
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x40b9d2
test dl, dl
je 0x40b9ce
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x40b9d2
add ecx, 2
add eax, 2
test dl, dl
jne 0x40b9b2
xor eax, eax
jmp 0x40b9d7
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40ba0d
lea ecx, [esp + 0x14]
call fcn.004103d5
test eax, eax
jle 0x40bf03
push dword [esp + 0x14]
push str._s_r_n
call fcn.00401109
push 1
push dword [esp + 0x20]
call fcn.005f5b20
add esp, 0x10
jmp 0x40bf03
xor ecx, ecx
cmp dword [esi + 0x1c], ecx
jne 0x40ba4b
push 0x800
lea eax, [esp + 0x454]
mov dword [esi + 0x1c], ebx
push eax
push ecx
mov byte [ebx], cl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor ecx, ecx
lea eax, [esp + 0x450]
push ecx
push ecx
push dword [ebx - 0x10]
push ebx
push 0xffffffffffffffff
push eax
push ecx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [esi + 0x1c]
lea edx, [esi + 0xbc8]
call fcn.00403d8e
xor ebx, ebx
inc ebx
cmp dword [esp + 0x18], ebx
jle 0x40bb05
cmp dword [ebp + ebx*4], edi
jne 0x40ba70
xor eax, eax
jmp 0x40ba80
push 0x1000
push dword [ebp + ebx*4]
call fcn.005f8650
pop ecx
pop ecx
mov ecx, dword [ebp + ebx*4]
mov edx, eax
push 1
push 0x6e0bd4
call fcn.0048ec14
mov dword [esp + 0x1c], eax
pop ecx
pop ecx
cmp eax, 2
jle 0x40baf1
push 2
push 0x6e0bd8
push dword [ebp + ebx*4]
call fcn.005f0db0
add esp, 0xc
test eax, eax
jne 0x40baf1
cmp dword [esp + 0x14], 0xf
jne 0x40baf1
mov eax, dword [ebp + ebx*4]
push 0xd
add eax, 2
push str.configUsesCWD
push eax
call fcn.005f0db0
add esp, 0xc
test eax, eax
jne 0x40baf1
mov eax, dword [ebp + ebx*4]
push 1
add eax, 0x10
push 0x6e0bec
push eax
call fcn.005f0db0
add esp, 0xc
test eax, eax
je 0x40bafe
inc ebx
cmp ebx, dword [esp + 0x18]
jl 0x40ba66
jmp 0x40bb05
mov dword [esi + 0x28], 1
push ecx
mov ecx, dword [esi + 0x1c]
mov edx, str..log
call fcn.00403315
pop ecx
xor edx, edx
mov ecx, eax
call fcn.0048ee63
mov dword [0x76b4e0], eax
call fcn.00485fa0
mov ecx, dword [esi]
mov edx, 0x408151
push esi
call fcn.00487a02
mov ecx, dword [ebp]
or edx, 0xffffffff
push 0x6e0bf8
call fcn.0048ec59
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jle 0x40bb9b
push ebx
push dword [ebp]
push 0x10000
push 0x771260
call fcn.005efb70
add esp, 0x10
cmp ebx, 0x10000
jae 0x40bf1e
push 0x1000
mov byte [ebx + 0x771260], 0
mov ebx, 0x76d260
push ebx
push 0xffffffffffffffff
push 0x771260
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor ebx, ebx
mov dword [esp + 0x20], esi
lea eax, [esp + 0x18]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], eax
cmp dword [esi + 0x10], ebx
jne 0x40bec3
cmp dword [esp + 0x18], 2
push 3
pop eax
jl 0x40bc04
mov ecx, dword [ebp + 4]
or edx, 0xffffffff
push 1
push eax
push 0x6e0bfc
call fcn.0048eb52
add esp, 0xc
test eax, eax
jne 0x40bec3
cmp dword [esp + 0x18], 2
jl 0x40bc04
mov ecx, dword [ebp + 4]
or edx, 0xffffffff
push 1
push 4
push 0x6e0c00
call fcn.0048eb52
add esp, 0xc
test eax, eax
jne 0x40bec3
mov ecx, dword [esi]
lea eax, [esp + 0x20]
push eax
push ebx
mov edx, 0x40b86d
call fcn.00487d40
pop ecx
pop ecx
mov ecx, dword [esi]
call fcn.0048ab6b
mov dword [esi], ebx
cmp dword [esi + 0x24], ebx
je 0x40beeb
cmp dword [esi + 0xb9c], ebx
je 0x40beb6
cmp dword [esi + 0xd40], ebx
jne 0x40bda0
call fcn.0047b885
mov edx, dword [esi + 0x24]
mov ebp, eax
mov ecx, ebp
call fcn.00480d97
or edx, 0xffffffff
mov ecx, ebp
call fcn.0041a9c6
test eax, eax
je 0x40bd84
or edx, 0xffffffff
mov ecx, ebp
call fcn.00418899
lea eax, [esp + 0x14]
or edx, 0xffffffff
push eax
mov ecx, ebp
call fcn.0041a3f9
mov ebx, dword [esp + 0x18]
xor edx, edx
pop ecx
mov dword [esp + 0x1c], eax
push 3
pop ecx
lea eax, [ebx*4 + 4]
div ecx
push 0xfffffffffffffffa
mov edi, eax
lea ecx, [ebx + 1]
pop eax
sub eax, edi
cmp ecx, eax
jae 0x40bcf0
push 0xfffffffffffffffe
pop eax
lea ecx, [edi + 5]
sub eax, ebx
cmp ecx, eax
jae 0x40bcf0
lea eax, [ebx + 6]
add eax, edi
cmp eax, 0xffffffef
jae 0x40bcf0
test ecx, ecx
je 0x40bcc7
lea eax, [ebx + 0x16]
add eax, edi
cmp eax, 0xffffffef
jae 0x40bcf0
xor eax, eax
cmp eax, ecx
push 0x180f
sbb eax, eax
and eax, 0x10
add eax, 0x16
push 0x6e0c08
add eax, edi
add eax, ebx
push 1
push eax
call fcn.005f5c60
add esp, 0x10
mov ecx, eax
jmp 0x40bcf2
xor ecx, ecx
lea eax, [edi + 5]
push 0
push eax
lea edx, [ebx + 1]
call fcn.00487604
mov edi, eax
pop ecx
pop ecx
cmp dword [edi - 0xc], 0
jbe 0x40bd18
mov ecx, dword [edi - 0x10]
add ecx, 0x10
add ecx, edi
mov dword [esp + 0x14], ecx
jmp 0x40bd1d
and dword [esp + 0x14], 0
push ebx
push dword [esp + 0x20]
lea edx, [ebx + 1]
mov ecx, edi
call section..text
pop ecx
pop ecx
mov ecx, ebp
call fcn.0045d31c
mov ecx, edi
cmp ebx, 0x7fffffff
jbe 0x40bd5b
call fcn.004876b9
xor ebx, ebx
mov edi, ebx
cmp dword [esi + 0xba8], ebx
je 0x40beb6
push str._Service_Parameters___ERROR
jmp 0x40bd95
lea eax, [esp + 0x14]
mov edx, ebx
push eax
call fcn.0048d3c2
xor ebx, ebx
pop ecx
cmp dword [esi + 0xba8], ebx
je 0x40beb6
push edi
push str._Service_Parameters____s
call fcn.0048fa69
pop ecx
jmp 0x40bd9a
cmp dword [esi + 0xba8], ebx
je 0x40beb6
push str._Service_Parameters___NONE
call fcn.0048fa69
pop ecx
jmp 0x40beb6
mov ebx, dword [esi + 0xd50]
mov ecx, str.meshagent
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40bdcd
test dl, dl
je 0x40bdc9
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40bdcd
add eax, 2
add ecx, 2
test dl, dl
jne 0x40bdad
xor eax, eax
jmp 0x40bdd2
sbb eax, eax
or eax, 1
test eax, eax
je 0x40beb4
mov edi, dword [ebx - 0x10]
xor edx, edx
push 3
pop ebp
push 0xfffffffffffffffa
lea eax, [edi*4 + 0x78]
div ebp
pop ecx
mov ebx, eax
lea edx, [edi + 0x1e]
sub ecx, ebx
cmp edx, ecx
jae 0x40be48
push 0xffffffffffffffe1
pop ecx
lea edx, [ebx + 5]
sub ecx, edi
cmp edx, ecx
jae 0x40be48
lea eax, [edi + 0x23]
add eax, ebx
cmp eax, 0xffffffef
jae 0x40be48
test edx, edx
je 0x40be1d
lea eax, [edi + 0x33]
add eax, ebx
cmp eax, 0xffffffef
jae 0x40be48
xor eax, eax
cmp eax, edx
push 0x1829
sbb eax, eax
add edi, 0x33
and eax, 0x10
push str...meshcore_agentcore.c
add eax, edi
add eax, ebx
push 1
push eax
call fcn.005f5c60
add esp, 0x10
mov edi, eax
xor ebx, ebx
jmp 0x40be4c
xor ebx, ebx
mov edi, ebx
mov eax, dword [esi + 0xd50]
xor edx, edx
push ebx
mov ecx, dword [eax - 0x10]
lea eax, [ecx*4 + 0x78]
div ebp
lea edx, [ecx + 0x1e]
mov ecx, edi
add eax, 5
push eax
call fcn.00487604
mov edi, eax
pop ecx
pop ecx
cmp dword [edi - 0xc], ebx
jbe 0x40be86
mov eax, dword [edi - 0x10]
add eax, 0x10
add eax, edi
mov dword [esp + 0x14], eax
jmp 0x40be8a
mov dword [esp + 0x14], ebx
lea eax, [esp + 0x14]
push eax
push dword [esi + 0xd50]
push str.____meshServiceName__s___
push dword [edi - 0x10]
push edi
call fcn.0040117f
add esp, 0x10
mov edx, eax
mov ecx, edi
call fcn.0048d3c2
jmp 0x40bd9a
xor ebx, ebx
mov ecx, dword [esi + 0x24]
call fcn.00493a2b
mov dword [esi + 0x24], ebx
jmp 0x40bee0
mov ecx, dword [esi]
lea eax, [esp + 0x20]
push eax
push ebx
mov edx, 0x40b858
call fcn.00487d40
pop ecx
pop ecx
mov ecx, dword [esi]
call fcn.0048ab6b
mov dword [esi], ebx
test edi, edi
je 0x40beeb
mov ecx, edi
call fcn.004876b9
call fcn.00486078
mov eax, dword [0x76b4e0]
test eax, eax
je 0x40bf03
push 1
push eax
call fcn.005f5b20
pop ecx
pop ecx
mov ecx, dword [esp + 0x1450]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005c0e20
add esp, 0x1444
ret
call fcn.005c0f80
int3