Function at 0x47a625
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
cmp dword [0x49f5ac], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
push edi
jne 0x47a7bc
or ecx, 0xffffffff
mov edi, 0x49f5a8
xor eax, eax
lock cmpxchg dword [edi], ecx
test eax, eax
je 0x47a66d
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
call esi
or ecx, 0xffffffff
xor eax, eax
lock cmpxchg dword [edi], ecx
test eax, eax
jne 0x47a65c
cmp dword [0x49f5ac], 0
jne 0x47a7b2
push 0xc00
push 8
push dword [0x4a01c8]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [esp + 0x14], eax
test esi, esi
je 0x47a6c4
mov edx, 0x100
lea ecx, [esi + 8]
lea ebx, [ebx]
mov dword [ecx - 8], 0
lea ecx, [ecx + 0xc]
mov dword [ecx - 0x10], 0
mov dword [ecx - 0xc], 0
sub edx, 1
jne 0x47a6a5
jmp 0x47a6ca
xor esi, esi
mov dword [esp + 0x14], esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
je 0x47a7a9
xor eax, eax
mov dword [esp + 0xc], eax
cmp word [edi], ax
je 0x47a79a
mov dword [esp + 0x10], esi
lea esp, [esp]
push edi
call ebx
xor ecx, ecx
test eax, eax
je 0x47a770
lea esp, [esp]
cmp word [edi + ecx*2], 0x3d
lea ebx, [edi + ecx*2]
je 0x47a727
inc ecx
cmp ecx, eax
jb 0x47a705
inc dword [esp + 0xc]
add esi, 0xc
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x10], esi
jmp 0x47a783
test ecx, ecx
je 0x47a77d
cmp ecx, 0xffffffff
je 0x47a76a
push ecx
push edi
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
lea ecx, [esp + 0x24]
call fcn.0047a549
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esi], eax
lea eax, [ebx + 2]
push eax
mov dword [esi + 4], ecx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esi + 8], eax
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
inc dword [esp + 0xc]
add esi, 0xc
mov dword [esp + 0x10], esi
jmp 0x47a783
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
call ebx
lea edi, [edi + eax*2]
add edi, 2
cmp word [edi], 0
jne 0x47a6f5
mov eax, dword [esp + 0xc]
push dword [esp + 0x18]
mov dword [0x49f5a4], eax
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, dword [esp + 0x14]
mov dword [0x49f5ac], eax
mov dword [0x49f5a8], 0
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
movzx edx, word [eax]
mov dword [esp + 0x50], ecx
cmp edx, 9
je 0x47a7e5
mov esi, 0x4009
mov ecx, edx
cmp dx, si
jne 0x47a847
mov ecx, dword [eax + 8]
test edx, 0x4000
je 0x47a7f2
mov ecx, dword [ecx]
test ecx, ecx
je 0x47aa4e
push 0
push 0
lea edx, [esp + 0x4c]
xor eax, eax
push edx
lea edx, [esp + 0x30]
mov word [esp + 0x50], ax
push edx
push 3
push 0
push 0x4cd4e0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, dword [ecx]
push 0
push ecx
call dword [eax + 0x18]
mov esi, eax
mov dword [esp + 0x54], esi
test esi, esi
js 0x47aa57
movzx ecx, word [esp + 0x44]
lea eax, [esp + 0x44]
mov edx, 0x4008
cmp cx, dx
jne 0x47a866
mov ecx, 8
mov word [esp + 0x34], cx
mov eax, dword [eax + 8]
mov esi, dword [eax]
mov dword [esp + 0x3c], esi
jmp 0x47a8d9
cmp cx, 8
jne 0x47a87f
mov ecx, 8
mov word [esp + 0x34], cx
mov esi, dword [eax + 8]
mov dword [esp + 0x3c], esi
jmp 0x47a8d9
cmp cx, 1
jne 0x47a88f
mov esi, 0x800a005e
jmp 0x47aa53
xor ecx, ecx
mov word [esp + 0x34], cx
mov ecx, 0x400c
cmp word [eax], cx
jne 0x47a8ad
jmp 0x47a8a5
mov eax, dword [eax + 8]
cmp word [eax], cx
je 0x47a8a5
push 3
push 2
push 0x400
push eax
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.OLEAUT32.dll_SafeArrayPtrOfIndex]
mov esi, eax
mov dword [esp + 0x54], esi
test esi, esi
js 0x47aa57
mov esi, dword [esp + 0x3c]
mov cx, word [esp + 0x34]
mov dword [esp + 0x54], 0
cmp cx, 8
jne 0x47a9a5
test esi, esi
je 0x47aa47
cmp word [esi], 0
je 0x47aa47
push esi
call ebx
push eax
push esi
lea ecx, [esp + 0x24]
call fcn.0047a549
mov edx, dword [0x49f5a4]
xor edi, edi
test edx, edx
jle 0x47a98c
mov esi, dword [0x49f5ac]
mov ebx, dword [esp + 0x20]
lea esp, [esp]
test esi, esi
jne 0x47a94c
test ebx, 0x1fff
jne 0x47a984
test esi, esi
je 0x47a98c
push dword [esi + 8]
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ecx, eax
xor esi, esi
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
jmp 0x47aa57
mov ecx, dword [esi + 4]
mov eax, ecx
xor eax, ebx
test eax, 0xffffe000
jne 0x47a984
mov eax, ebx
and ecx, 0x1fff
and eax, 0x1fff
cmp eax, ecx
jne 0x47a984
push ecx
push dword [esi]
push dword [esp + 0x24]
call fcn.004980ec
add esp, 0xc
test eax, eax
je 0x47a931
mov edx, dword [0x49f5a4]
inc edi
add esi, 0xc
cmp edi, edx
jl 0x47a925
push 0x4d2168
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ecx, eax
xor esi, esi
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
jmp 0x47aa57
lea eax, [esi - 1]
cmp eax, 0xfe
ja 0x47aa47
dec esi
cmp esi, dword [0x49f5a4]
jge 0x47aa33
mov eax, dword [0x49f5ac]
lea ecx, [esi + esi*2]
lea ebx, [eax + ecx*4]
test ebx, ebx
je 0x47aa33
mov esi, dword [ebx + 4]
mov eax, dword [ebx + 8]
and esi, 0x1fff
test eax, eax
je 0x47a9e5
mov eax, dword [eax - 4]
cdq
sub eax, edx
sar eax, 1
jmp 0x47a9e7
xor eax, eax
mov dword [esp + 0x14], eax
inc eax
add eax, esi
push eax
push 0
call dword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov edi, dword [ebp + 0xc]
add esi, esi
push esi
mov dword [edi], eax
push dword [ebx]
push eax
call fcn.0049865d
mov eax, dword [edi]
mov ecx, 0x3d
add esp, 0xc
mov word [esi + eax], cx
mov eax, dword [esp + 0x14]
add eax, eax
push eax
mov eax, dword [edi]
push dword [ebx + 8]
add eax, 2
add eax, esi
push eax
call fcn.0049865d
add esp, 0xc
xor esi, esi
jmp 0x47aa57
push 0x4d2168
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov ecx, dword [ebp + 0xc]
xor esi, esi
mov dword [ecx], eax
jmp 0x47aa57
mov esi, 0x80004005
jmp 0x47aa57
mov esi, 0x800a005b
mov dword [esp + 0x54], esi
cmp word [esp + 0x44], 0
je 0x47aa6a
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8