Function at 0x47d140
Capabilities:
Query environment variable

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x430
mov esi, ecx
lea ecx, [esp + 0x30]
push dword [esp + 0x444]
call fcn.0047d3c0
add esp, 4
mov ecx, dword [esp + 0x30]
mov eax, ecx
neg eax
jno 0x47d1c1
cmp byte [esp + 0x34], 3
jne 0x47d1b6
mov ebp, esi
mov esi, dword [esp + 0x38]
mov ebx, dword [esi + 4]
mov edi, dword [esi]
mov eax, dword [ebx]
test eax, eax
je 0x47d187
push edi
call eax
add esp, 4
cmp dword [ebx + 4], 0
je 0x47d1a5
cmp dword [ebx + 8], 9
jb 0x47d196
mov edi, dword [edi - 4]
push edi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, ebp
mov dword [esi], connect
jmp 0x47d391
mov eax, dword [esp + 0x34]
mov dword [esp], esi
mov ebx, 0x200
xor esi, esi
mov dword [esp + 8], 0
mov dword [esp + 0xc], 2
mov dword [esp + 4], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 2
mov dword [esp + 0x1c], eax
cmp ebx, 0x201
jae 0x47d230
jmp 0x47d21e
jbe 0x47d2b9
cmp ebx, 0x201
jae 0x47d230
mov dword [esp + 0x18], 0x200
lea edi, [esp + 0x30]
mov ebp, ebx
jmp 0x47d242
sub ebx, esi
jne 0x47d295
mov edi, dword [esp + 0x14]
mov ebp, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebp
push edi
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebx, eax
test eax, eax
jne 0x47d26a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x47d34f
cmp ebx, ebp
jne 0x47d210
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x47d3ba
lea ebx, [ebp + ebp]
test ebp, ebp
mov eax, 0xffffffff
cmovs ebx, eax
cmp ebx, 0x201
jb 0x47d21e
jmp 0x47d230
lea ecx, [esp + 8]
mov edx, esi
push 2
push 2
push ebx
call fcn.004df9e0
add esp, 0xc
mov eax, dword [esp + 0xc]
mov esi, dword [esp + 8]
mov dword [esp + 0x14], eax
jmp 0x47d234
cmp ebx, dword [esp + 0x18]
ja 0x47d3ba
lea ecx, [esp + 0x20]
mov edx, edi
push ebx
call fcn.0047c3e0
add esp, 4
cmp dword [esp + 8], 0
je 0x47d2eb
push dword [esp + 0xc]
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov ecx, dword [esp + 4]
cmp eax, dword [esp + 0x20]
jno 0x47d39c
mov eax, dword [esp]
mov esi, dword [esp + 0x28]
cmp byte [esp + 0x24], 3
mov dword [eax], connect
jne 0x47d37b
mov ebx, dword [esi + 4]
mov edi, dword [esi]
mov eax, dword [ebx]
test eax, eax
je 0x47d320
push edi
call eax
add esp, 4
cmp dword [ebx + 4], 0
je 0x47d33e
cmp dword [ebx + 8], 9
jb 0x47d32f
mov edi, dword [edi - 4]
push edi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x47d377
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [esp + 8], 0
je 0x47d36e
push dword [esp + 0xc]
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp]
mov dword [eax], connect
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x47d391
push dword [esp + 0x1c]
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
add esp, 0x430
pop esi
pop edi
pop ebx
pop ebp
ret
movsd xmm0, qword [esp + 0x20]
mov eax, dword [esp]
movsd xmm1, qword [esp + 0x28]
movsd qword [eax + 8], xmm1
movsd qword [eax], xmm0
test ecx, ecx
jne 0x47d37f
jmp 0x47d391
ud2