Function at 0x43c970
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x7b088c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, 1
mov dword [ebp - 0x28], edx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xc], 0
lea eax, [ebx + 0x2b]
mov dword [ebp - 8], ebx
call fcn.006839e0
cmp dword [edi], 0
mov esi, edi
mov dword [ebp - 0x20], esp
je 0x43c9e8
nop dword [eax]
push 0x3d
push dword [esi]
call fcn.0068a430
add esp, 8
test eax, eax
je 0x43c9e0
push 0
push 0
push 0xffffffffffffffff
push dword [esi]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x43ca2c
add dword [ebp - 0xc], eax
inc ebx
mov dword [ebp - 8], ebx
add esi, 4
cmp dword [esi], 0
jne 0x43c9b0
mov edx, dword [ebp - 0xc]
add edx, edx
lea ecx, [edx + 8]
cmp edx, ecx
sbb eax, eax
test ecx, eax
je 0x43cbb9
cmp edx, ecx
sbb eax, eax
and eax, ecx
lea ecx, [edx + 8]
cmp eax, 0x400
ja 0x43ca46
cmp edx, ecx
sbb eax, eax
and eax, ecx
call fcn.006841b0
mov esi, esp
mov dword [ebp - 0x14], esi
test esi, esi
je 0x43cbb9
mov dword [esi], 0xcccc
jmp 0x43ca68
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00682c16
mov esp, ebp
pop ebp
ret
cmp edx, ecx
sbb eax, eax
and eax, ecx
push eax
call fcn.006a66fd
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
test esi, esi
je 0x43cbb9
mov dword [esi], 0xdddd
add esi, 8
mov dword [ebp - 0x14], esi
test esi, esi
je 0x43cbb9
lea eax, [ebx*4]
call fcn.006841b0
cmp dword [edi], 0
mov eax, esp
mov dword [ebp - 0x10], eax
mov ebx, eax
je 0x43cad3
nop
push 0x3d
push dword [edi]
call fcn.0068a430
add esp, 8
test eax, eax
je 0x43cacb
mov eax, dword [ebp - 0xc]
mov ecx, esi
sub ecx, dword [ebp - 0x14]
sar ecx, 1
sub eax, ecx
push eax
push esi
push 0xffffffffffffffff
push dword [edi]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x43cb1e
mov dword [ebx], esi
add ebx, 4
lea esi, [esi + eax*2]
add edi, 4
cmp dword [edi], 0
jne 0x43ca90
mov eax, dword [ebp - 8]
push 0x43c950
push 4
dec eax
mov dword [ebx], 0
mov ebx, dword [ebp - 0x10]
push eax
push ebx
call fcn.006bd550
mov edi, dword [ebp - 0x20]
add esp, 0x10
xor esi, esi
mov eax, dword [ebx]
test eax, eax
je 0x43cb53
mov edx, dword [esi + 0x7652c8]
mov ecx, dword [esi + 0x7652c4]
push eax
call fcn.0043c830
add esp, 4
test eax, eax
js 0x43cb53
add ebx, 4
test eax, eax
jne 0x43cb7a
jmp 0x43cb74
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x14]
mov esi, eax
add ecx, 0xfffffff8
cmp dword [ecx], 0xdddd
jne 0x43cb3d
push ecx
call fcn.006a389b
add esp, 4
mov eax, esi
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00682c16
mov esp, ebp
pop ebp
ret
push 0
push 0
push dword [esi + 0x7652c0]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [edi], eax
test eax, eax
je 0x43cb74
mov ecx, dword [esi + 0x7652c8]
add ecx, eax
add dword [ebp - 0xc], ecx
add esi, 0xc
add edi, 4
cmp esi, 0x84
jb 0x43caf6
mov eax, dword [ebp - 0xc]
lea eax, [eax*2 + 2]
push eax
call fcn.006a66fd
mov ebx, eax
add esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
jne 0x43cbd2
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff8
cmp dword [eax], 0xdddd
jne 0x43cbb9
push eax
call fcn.006a389b
add esp, 4
mov eax, 0xe
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00682c16
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
xor esi, esi
mov edx, ebx
mov dword [ebp - 0x1c], esi
xor edi, edi
mov eax, dword [eax]
mov dword [ebp - 0x18], edx
test eax, eax
jne 0x43cc6f
cmp edi, 0x84
jae 0x43cd4e
test eax, eax
je 0x43cc7d
mov edx, dword [edi + 0x7652c8]
mov ecx, dword [edi + 0x7652c4]
push eax
call fcn.0043c830
mov edx, dword [ebp - 0x18]
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
js 0x43cc7d
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx]
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x43cc26
sub ecx, ebx
sar ecx, 1
lea ebx, [ecx + 1]
lea eax, [ebx + ebx]
push eax
mov eax, dword [ebp - 0x10]
push dword [eax]
push edx
call fcn.00689000
mov eax, dword [ebp - 0x10]
add esp, 0xc
add eax, 4
cmp dword [ebp - 8], 0
mov dword [ebp - 0x10], eax
jne 0x43cd43
mov edx, dword [ebp - 0x18]
inc esi
add edi, 0xc
mov dword [ebp - 0x1c], esi
lea edx, [edx + ebx*2]
jmp 0x43cbde
cmp esi, 0xb
jb 0x43cbf7
mov dword [ebp - 8], 1
jmp 0x43cc1e
mov eax, dword [ebp - 0x20]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x43cd39
mov ecx, dword [edi + 0x7652c4]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x43cc91
mov eax, dword [edi + 0x7652c8]
mov edx, dword [ebp - 0x18]
lea edx, [edx + eax*2]
mov eax, dword [ebp - 0xc]
mov ecx, edx
mov dword [ebp - 0x18], edx
sub ecx, dword [ebp - 0x24]
sar ecx, 1
sub eax, ecx
push eax
push edx
push dword [edi + 0x7652c0]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [ebx - 1]
cmp eax, ecx
je 0x43cd39
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
mov esi, eax
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
push 0x400
push esi
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [ebp - 8]
mov ecx, str.Unknown_error
test eax, eax
cmovne ecx, eax
push ecx
push esi
push 0x76e590
push str._s:___d___s
push 2
call fcn.0069160e
add esp, 4
push eax
call fcn.0044c050
mov eax, dword [ebp - 8]
add esp, 0x14
test eax, eax
je 0x43cd36
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
inc esi
add edi, 0xc
mov dword [ebp - 0x1c], esi
mov edx, dword [ebp - 0x18]
lea edx, [edx + ebx*2]
jmp 0x43cbde
xor eax, eax
mov word [edx], ax
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff8
cmp dword [eax], 0xdddd
jne 0x43cd6a
push eax
call fcn.006a389b
add esp, 4
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov dword [ecx], eax
xor eax, eax
lea esp, [ebp - 0x34]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00682c16
mov esp, ebp
pop ebp
ret