Function at 0x100db110
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, ecx
mov dword [ebp - 0x14], edx
push esi
push edi
test ebx, ebx
jne 0x100db1f1
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x101042e0]
mov esi, eax
call fcn.100290c0
mov ecx, dword [0x101042e4]
or ebx, 0xffffffff
xor edi, edi
mov dword [ebp - 0x14], eax
cmp ecx, ebx
je 0x100db162
call fcn.100290c0
test eax, eax
je 0x100db15c
cmp eax, ebx
je 0x100db1d1
jmp 0x100db1c8
mov ecx, dword [0x101042e4]
mov edx, ebx
call fcn.1003b000
test eax, eax
je 0x100db1d1
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov dword [ebp - 0xc], eax
pop ecx
pop ecx
mov ecx, dword [0x101042e4]
test eax, eax
jne 0x100db198
xor edx, edx
call fcn.1003b000
push edi
call sym.ucrtbase.dll__free_base
pop ecx
jmp 0x100db1d1
mov edx, eax
call fcn.1003b000
test eax, eax
jne 0x100db1b5
mov ecx, dword [0x101042e4]
xor edx, edx
call fcn.1003b000
push dword [ebp - 0xc]
jmp 0x100db190
mov ecx, dword [ebp - 0xc]
call fcn.1003e545
push 0
call sym.ucrtbase.dll__free_base
mov eax, dword [ebp - 0xc]
pop ecx
imul edi, dword [ebp - 0x14], 0x364
add edi, eax
push esi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test edi, edi
jne 0x100db1e3
mov edi, 0x101049f4
jmp 0x100db1e6
add edi, 0x10
mov dword [edi], 0x16
jmp 0x100db6b7
push 0x3d
push ebx
mov dword [ebp - 4], ebx
call sym.ucrtbase.dll_wcschr
mov esi, eax
mov dword [ebp - 0x10], esi
pop ecx
pop ecx
test esi, esi
je 0x100db5eb
cmp esi, ebx
je 0x100db5eb
movzx eax, word [esi + 2]
mov dword [ebp - 0xc], eax
call fcn.100db793
call fcn.10028c80
xor edi, edi
lea eax, [eax*4 + 0x10105ad0]
cmp dword [eax], edi
jne 0x100db398
cmp dword [ebp - 0x14], edi
je 0x100db303
call fcn.10028c80
lea eax, [eax*4 + 0x10105ad8]
cmp dword [eax], edi
je 0x100db303
call fcn.10047a69
test eax, eax
jne 0x100db2f9
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x101042e0]
mov esi, eax
call fcn.100290c0
mov ecx, dword [0x101042e4]
or ebx, 0xffffffff
mov dword [ebp - 0x14], eax
cmp ecx, ebx
je 0x100db295
call fcn.100290c0
test eax, eax
jne 0x100db619
mov ecx, dword [0x101042e4]
mov edx, ebx
call fcn.1003b000
test eax, eax
je 0x100db694
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov dword [ebp - 0xc], eax
pop ecx
pop ecx
mov ecx, dword [0x101042e4]
test eax, eax
je 0x100db64b
mov edx, eax
call fcn.1003b000
test eax, eax
jne 0x100db2e3
mov ecx, dword [0x101042e4]
xor edx, edx
call fcn.1003b000
push dword [ebp - 0xc]
jmp 0x100db653
mov ecx, dword [ebp - 0xc]
call fcn.1003e545
push edi
call sym.ucrtbase.dll__free_base
mov eax, dword [ebp - 0xc]
jmp 0x100db68a
call fcn.100db793
jmp 0x100db398
cmp word [ebp - 0xc], di
je 0x100db425
call fcn.10028c80
lea eax, [eax*4 + 0x10105ad8]
cmp dword [eax], edi
jne 0x100db33d
push 4
push 1
call sym.ucrtbase.dll__calloc_base
mov esi, eax
call fcn.10028c80
push edi
mov dword [eax*4 + 0x10105ad8], esi
call sym.ucrtbase.dll__free_base
add esp, 0xc
call fcn.10028c80
lea eax, [eax*4 + 0x10105ad8]
cmp dword [eax], edi
je 0x100db5e3
call fcn.10028c80
lea eax, [eax*4 + 0x10105ad0]
cmp dword [eax], edi
jne 0x100db381
push 4
push 1
call sym.ucrtbase.dll__calloc_base
mov esi, eax
call fcn.10028c80
push edi
mov dword [eax*4 + 0x10105ad0], esi
call sym.ucrtbase.dll__free_base
add esp, 0xc
call fcn.10028c80
lea eax, [eax*4 + 0x10105ad0]
cmp dword [eax], edi
je 0x100db5e3
mov esi, dword [ebp - 0x10]
call fcn.10028c80
lea eax, [eax*4 + 0x10105ad0]
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x100db5e3
sub esi, ebx
mov ecx, ebx
sar esi, 1
mov edx, esi
mov dword [ebp - 0x10], esi
call fcn.100db7d5
mov esi, eax
mov eax, dword [ebp - 8]
test esi, esi
js 0x100db41f
cmp dword [eax], edi
je 0x100db41f
push dword [eax + esi*4]
call sym.ucrtbase.dll__free_base
pop ecx
cmp word [ebp - 0xc], di
jne 0x100db414
mov ecx, dword [ebp - 8]
jmp 0x100db3ea
mov eax, dword [ecx + esi*4 + 4]
mov dword [ecx + esi*4], eax
inc esi
cmp dword [ecx + esi*4], edi
jne 0x100db3e2
push 4
mov edx, esi
call fcn.100243ab
pop ecx
push edi
mov esi, eax
call sym.ucrtbase.dll__free_base
pop ecx
test esi, esi
je 0x100db47d
call fcn.10028c80
mov dword [eax*4 + 0x10105ad0], esi
jmp 0x100db47d
mov eax, dword [ebp - 8]
mov dword [ebp - 4], edi
mov dword [eax + esi*4], ebx
jmp 0x100db47d
cmp word [ebp - 0xc], di
jne 0x100db42c
mov ebx, edi
jmp 0x100db6af
neg esi
lea edx, [esi + 2]
cmp edx, esi
jb 0x100db5e3
cmp edx, 0x3fffffff
jae 0x100db5e3
push 4
mov ecx, eax
call fcn.100243ab
pop ecx
push edi
mov dword [ebp - 8], eax
call sym.ucrtbase.dll__free_base
mov eax, dword [ebp - 8]
pop ecx
test eax, eax
je 0x100db5e3
mov dword [ebp - 4], edi
mov dword [eax + esi*4], ebx
mov dword [eax + esi*4 + 4], edi
call fcn.10028c80
mov ecx, dword [ebp - 8]
mov dword [eax*4 + 0x10105ad0], ecx
cmp dword [ebp - 0x14], edi
je 0x100db5d4
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x100db48b
sub ecx, edx
sar ecx, 1
push 2
lea eax, [ecx + 2]
push eax
mov dword [ebp - 0x14], eax
call sym.ucrtbase.dll__calloc_base
mov esi, eax
mov dword [ebp - 8], esi
pop ecx
pop ecx
test esi, esi
jne 0x100db4c0
lea ecx, [ebp - 8]
call fcn.1002896d
jmp 0x100db425
push ebx
push dword [ebp - 0x14]
push esi
call sym.ucrtbase.dll_wcscpy_s
add esp, 0xc
test eax, eax
jne 0x100db6be
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov word [esi + eax*2], cx
inc eax
mov ecx, dword [ebp - 0xc]
movzx ecx, cx
neg ecx
lea eax, [esi + eax*2]
sbb ecx, ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x100db5cc
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x101042e0]
mov esi, eax
call fcn.100290c0
mov ecx, dword [0x101042e4]
or ebx, 0xffffffff
mov dword [ebp - 0x14], eax
cmp ecx, ebx
je 0x100db536
call fcn.100290c0
test eax, eax
je 0x100db530
cmp eax, ebx
je 0x100db5a4
jmp 0x100db59b
mov ecx, dword [0x101042e4]
mov edx, ebx
call fcn.1003b000
test eax, eax
je 0x100db5a4
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov dword [ebp - 0x10], eax
pop ecx
pop ecx
mov ecx, dword [0x101042e4]
test eax, eax
jne 0x100db56c
xor edx, edx
call fcn.1003b000
push edi
call sym.ucrtbase.dll__free_base
pop ecx
jmp 0x100db5a4
mov edx, eax
call fcn.1003b000
test eax, eax
jne 0x100db589
mov ecx, dword [0x101042e4]
xor edx, edx
call fcn.1003b000
push dword [ebp - 0x10]
jmp 0x100db564
mov ecx, dword [ebp - 0x10]
call fcn.1003e545
push edi
call sym.ucrtbase.dll__free_base
mov eax, dword [ebp - 0x10]
pop ecx
imul edi, dword [ebp - 0x14], 0x364
add edi, eax
push esi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test edi, edi
jne 0x100db5b6
mov edi, 0x101049f4
jmp 0x100db5b9
add edi, 0x10
lea ecx, [ebp - 8]
mov dword [edi], 0x2a
call fcn.1002896d
jmp 0x100db6af
lea ecx, [ebp - 8]
call fcn.1002896d
lea ecx, [ebp - 4]
call fcn.1002896d
xor eax, eax
jmp 0x100db6b9
or ebx, 0xffffffff
jmp 0x100db6af
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, dword [0x101042e0]
mov esi, eax
call fcn.100290c0
mov ecx, dword [0x101042e4]
or ebx, 0xffffffff
xor edi, edi
mov dword [ebp - 0x14], eax
cmp ecx, ebx
je 0x100db625
call fcn.100290c0
test eax, eax
je 0x100db61f
cmp eax, ebx
je 0x100db694
jmp 0x100db68b
mov ecx, dword [0x101042e4]
mov edx, ebx
call fcn.1003b000
test eax, eax
je 0x100db694
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov dword [ebp - 0x10], eax
pop ecx
pop ecx
mov ecx, dword [0x101042e4]
test eax, eax
jne 0x100db65b
xor edx, edx
call fcn.1003b000
push edi
call sym.ucrtbase.dll__free_base
pop ecx
jmp 0x100db694
mov edx, eax
call fcn.1003b000
test eax, eax
jne 0x100db678
mov ecx, dword [0x101042e4]
xor edx, edx
call fcn.1003b000
push dword [ebp - 0x10]
jmp 0x100db653
mov ecx, dword [ebp - 0x10]
call fcn.1003e545
push 0
call sym.ucrtbase.dll__free_base
mov eax, dword [ebp - 0x10]
pop ecx
imul edi, dword [ebp - 0x14], 0x364
add edi, eax
push esi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test edi, edi
jne 0x100db6a6
mov edi, 0x101049f4
jmp 0x100db6a9
add edi, 0x10
mov dword [edi], 0x16
lea ecx, [ebp - 4]
call fcn.1002896d
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
push edi
push edi
push edi
push edi
push edi
call sym.ucrtbase.dll__invoke_watson
int3