Function at 0x40d5b6
Capabilities:
Set environment variable

Disassembly:
push 0x234
mov eax, 0x416d2c
call fcn.00415e14
mov bl, cl
movzx eax, bl
push eax
push 0x402268
call fcn.0040c6bc
xor esi, esi
or edi, 0xffffffff
pop ecx
inc esi
pop ecx
test bl, bl
je 0x40d68b
xor ebx, ebx
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x218], ebx
mov dword [ebp - 0x214], ebx
lea eax, [ebp - 0x210]
mov dword [ebp - 0x21c], 0x200
mov dword [ebp - 0x214], eax
mov dword [ebp - 4], ebx
push 2
pop edx
mov dword [ebp - 0x220], edx
mov eax, dword [ebp - 0x214]
xor ecx, ecx
mov word [eax], cx
mov dword [ebp - 4], edx
lea ecx, [ebp - 0x220]
call fcn.0040ac71
lea ecx, [ebp - 0x220]
call fcn.00410ead
push dword [ebp - 0x214]
push 0x4022b8
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp eax, esi
je 0x40d678
push 0x4022e8
call fcn.0040c6bc
pop ecx
or dword [ebp - 4], edi
lea ecx, [ebp - 0x220]
call fcn.0040a64a
jmp 0x40d915
mov dword [ebp - 4], edi
lea ecx, [ebp - 0x220]
call fcn.0040a64a
jmp 0x40d7af
call fcn.0040d15d
test al, al
je 0x40d7ad
push 0x402394
call fcn.0040c6bc
xor ebx, ebx
pop ecx
mov dword [ebp - 0x240], ebx
call fcn.0040df84
test al, al
je 0x40d706
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, eax
jmp 0x40d6cf
cmp byte [0x41a56e], bl
jne 0x40d702
call fcn.0040df84
test al, al
je 0x40d702
mov esi, dword [0x41a564]
test esi, esi
je 0x40d6be
lea eax, [ebp - 0x240]
mov ecx, esi
push eax
push edi
call dword [0x41b25c]
call esi
test eax, eax
je 0x40d706
cmp dword [ebp - 0x240], ebx
je 0x40d706
mov byte [0x41a9a4], bl
jmp 0x40d7a3
mov eax, ebx
jmp 0x40d6eb
mov byte [0x41a9a4], 1
push ebx
push ebx
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov esi, eax
cmp dword [0x41a068], ebx
je 0x40d739
mov ecx, dword [0x41a064]
test ecx, ecx
je 0x40d733
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x41a068], ebx
or edi, 0xffffffff
mov dword [0x41a064], esi
cmp esi, edi
je 0x40d751
xor esi, esi
inc esi
mov dword [0x41a068], esi
jmp 0x40d754
xor esi, esi
inc esi
push ebx
push ebx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x228], eax
cmp dword [0x41a078], ebx
je 0x40d789
mov ecx, dword [0x41a074]
test ecx, ecx
je 0x40d783
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x228]
mov dword [0x41a078], ebx
mov dword [0x41a074], eax
cmp eax, edi
je 0x40d798
mov dword [0x41a078], esi
push 0x4023c4
call fcn.0040c6bc
pop ecx
call fcn.0040d096
jmp 0x40d915
xor ebx, ebx
push ebx
push esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], ebx
cmp eax, edi
je 0x40d7cf
mov dword [ebp - 0x228], esi
mov dword [ebp - 4], 7
mov edx, 0x4026d4
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x23c], edx
mov dword [ebp - 0x238], edi
mov byte [ebp - 4], 8
mov ecx, 0x4025b0
mov dword [ebp - 0x23c], ecx
mov byte [ebp - 4], 9
mov dword [ebp - 0x234], edx
mov dword [ebp - 0x230], edi
mov byte [ebp - 4], 0xa
mov dword [ebp - 0x234], ecx
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x224]
push ecx
push eax
push 0x4023f8
lea ecx, [ebp - 0x23c]
call fcn.0040ec40
test eax, eax
js 0x40d897
cmp dword [ebp - 0x224], 0
jne 0x40d897
mov esi, dword [ebp - 0x22c]
lea eax, [ebp - 0x224]
push eax
push esi
push 0x401538
lea ecx, [ebp - 0x234]
call fcn.0040ec40
test eax, eax
js 0x40d88b
cmp dword [ebp - 0x224], 0
jne 0x40d88b
call fcn.0040d230
test al, al
jne 0x40d8a8
push 0x40251c
call fcn.0040c6bc
pop ecx
mov byte [0x41a9a4], bl
call fcn.0040d096
jmp 0x40d8a8
push 0x4024a0
call fcn.0040c6bc
jmp 0x40d8a7
push 0x402420
call fcn.0040c6bc
mov esi, dword [ebp - 0x22c]
pop ecx
mov byte [ebp - 4], 9
mov dword [ebp - fcn.0040ebb0], 0x4026d4
cmp dword [ebp - 0x230], edi
je 0x40d8d0
push dword [ebp - 0x230]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x230], edi
mov byte [ebp - 4], 7
mov dword [ebp - fcn.0040ebb0], 0x4026d4
cmp dword [ebp - 0x238], edi
je 0x40d8f8
push dword [ebp - 0x238]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x238], edi
mov dword [ebp - 4], edi
cmp dword [ebp - 0x228], 0
je 0x40d915
test esi, esi
je 0x40d90f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x228], ebx
call fcn.00415dbe
ret