Function at 0x43e977
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x5c9040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x4c], edx
push esi
xor esi, esi
mov dword [ebp - 0x34], 1
mov ecx, esi
mov eax, dword [ebx]
push edi
mov dword [ebp - 0x3c], ecx
mov edi, ebx
jmp 0x43e9dc
push 0x3d
push eax
call fcn.0051c170
pop ecx
pop ecx
test eax, eax
je 0x43e9d4
push esi
push esi
push 0xffffffffffffffff
push dword [edi]
push esi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x43ea0a
mov ecx, dword [ebp - 0x3c]
add ecx, eax
inc dword [ebp - 0x34]
mov dword [ebp - 0x3c], ecx
jmp 0x43e9d7
mov ecx, dword [ebp - 0x3c]
add edi, 4
mov eax, dword [edi]
test eax, eax
jne 0x43e9a3
add ecx, ecx
call fcn.004396f2
mov edi, eax
mov dword [ebp - 0x44], edi
test edi, edi
jne 0x43ea12
cmp dword [ebp - 0x3c], esi
jbe 0x43ea12
push 0xe
pop eax
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051b034
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x43e9f8
mov eax, dword [ebp - 0x34]
shl eax, 2
call fcn.0054e930
mov eax, esp
mov ecx, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x38], ecx
jmp 0x43ea73
push 0x3d
push eax
call fcn.0051c170
pop ecx
pop ecx
test eax, eax
je 0x43ea6d
mov eax, dword [ebp - 0x3c]
mov ecx, edi
sub ecx, dword [ebp - 0x44]
sar ecx, 1
sub eax, ecx
push eax
push edi
push 0xffffffffffffffff
push dword [ebx]
push esi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x43eaea
mov ecx, dword [ebp - 0x38]
mov dword [ecx], edi
add ecx, 4
mov dword [ebp - 0x38], ecx
lea edi, [edi + eax*2]
jmp 0x43ea70
mov ecx, dword [ebp - 0x38]
add ebx, 4
mov eax, dword [ebx]
test eax, eax
jne 0x43ea29
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x40]
dec eax
push 0x43e961
push 4
push eax
push ebx
mov dword [ecx], esi
call fcn.005300b0
mov eax, ebx
add esp, 0x10
mov dword [ebp - 0x34], eax
lea ebx, [ebp - 0x30]
mov edi, esi
mov ecx, dword [eax]
lea eax, [edi + 0x563168]
mov dword [ebp - 0x38], eax
test ecx, ecx
je 0x43eac7
mov edx, dword [eax]
push ecx
mov ecx, dword [edi + 0x563164]
call fcn.0043e886
pop ecx
mov ecx, eax
test ecx, ecx
jns 0x43eaf4
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x38], eax
push esi
push esi
push dword [edi + 0x563160]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebx], eax
test eax, eax
je 0x43eae5
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ecx]
add ecx, eax
add dword [ebp - 0x3c], ecx
mov eax, dword [ebp - 0x34]
jmp 0x43eb01
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x43eb28
mov eax, dword [ebp - 0x34]
add eax, 4
mov dword [ebp - 0x34], eax
test ecx, ecx
jne 0x43eb07
add edi, 0xc
add ebx, 4
cmp edi, 0x84
jb 0x43ea9d
mov eax, dword [ebp - 0x3c]
lea ecx, [eax*2 + 2]
call fcn.004396f2
mov dword [ebp - 0x48], eax
test eax, eax
jne 0x43eb37
push 0xe
pop esi
mov ecx, dword [ebp - 0x44]
call fcn.00439702
mov eax, esi
jmp 0x43e9f8
mov ebx, eax
mov edi, esi
mov eax, dword [ebp - 0x40]
cmp dword [eax], 0
jne 0x43eb4f
cmp edi, 0x84
jae 0x43ec0b
cmp esi, 0xb
jb 0x43eb5d
mov dword [ebp - 0x38], 1
jmp 0x43eb80
cmp dword [eax], 0
je 0x43ebb1
push dword [eax]
mov edx, dword [edi + 0x563168]
mov ecx, dword [edi + 0x563164]
call fcn.0043e886
mov dword [ebp - 0x38], eax
pop ecx
test eax, eax
js 0x43ebb1
mov eax, dword [ebp - 0x40]
push dword [eax]
call fcn.0052fd64
inc eax
mov dword [ebp - 0x34], eax
lea ecx, [eax + eax]
mov eax, dword [ebp - 0x40]
push ecx
push dword [eax]
push ebx
call fcn.0051c650
mov eax, dword [ebp - 0x40]
add esp, 0x10
mov edx, dword [ebp - 0x34]
add eax, 4
cmp dword [ebp - 0x38], 0
mov dword [ebp - 0x40], eax
jne 0x43ec03
jmp 0x43ebff
mov eax, dword [ebp + esi*4 - 0x30]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x43ebf9
push dword [edi + 0x563164]
push ebx
call fcn.00530081
mov eax, dword [edi + 0x563168]
pop ecx
pop ecx
lea ebx, [ebx + eax*2]
mov eax, dword [ebp - 0x3c]
mov ecx, ebx
sub ecx, dword [ebp - 0x48]
sar ecx, 1
sub eax, ecx
push eax
push ebx
push dword [edi + 0x563160]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [ebp - 0x34]
lea ecx, [edx - 1]
cmp eax, ecx
jne 0x43ec27
jmp 0x43ebfc
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x40]
inc esi
add edi, 0xc
lea ebx, [ebx + edx*2]
jmp 0x43eb3e
mov ecx, dword [ebp - 0x44]
xor eax, eax
mov word [ebx], ax
call fcn.00439702
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x48]
mov dword [ecx], eax
xor eax, eax
jmp 0x43e9f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x589ae4
mov ecx, eax
call fcn.00449c84
int3