Function at 0x42d040
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x214
cmp byte [eax + 0x17], 0
push ebx
push ebp
push esi
push edi
jne 0x42d05e
mov eax, dword [eax + 0xc]
mov dword [esp + 0x228], eax
mov ebx, dword [esp + 0x1c]
xor esi, esi
mov dword [esp + 0x18], esi
test esi, esi
je 0x42d09b
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x228]
push 1
push 0
push ecx
push 0
push edi
call fcn.004aefb0
cmp eax, 1
jne 0x42d421
push 0
push eax
mov ecx, edi
call fcn.004016f0
mov ebx, eax
jmp 0x42d0a3
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x22c]
lea ebx, [ebx]
movzx eax, word [ecx]
mov ebp, 1
test ax, ax
je 0x42d0fc
lea ecx, [ecx]
mov dx, word [0x516518]
mov di, word [0x516514]
cmp ax, dx
je 0x42d160
cmp ax, di
je 0x42d160
test esi, esi
je 0x42d0ec
mov word [ebx], ax
add ebx, 2
jmp 0x42d0f0
add dword [esp + 0x10], ebp
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x42d0c0
add esi, ebp
mov dword [esp + 0x18], esi
cmp esi, 2
jl 0x42d068
xor ecx, ecx
push ecx
mov word [ebx], cx
mov ecx, dword [esp + 0x22c]
push ebp
call fcn.004016f0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x42d121
mov esi, dword [esp + 0x228]
sub eax, edx
sar eax, 1
mov edi, eax
cmp byte [esi + 0x17], cl
jne 0x42d141
mov esi, dword [esi + 0xc]
cmp byte [esi + 0x17], 1
jne 0x42d430
test byte [esi + 0x15], 8
je 0x42d158
mov eax, esi
call fcn.00401610
lea eax, [esi + 0xc]
jmp 0x42d435
movzx eax, word [ecx]
test ax, ax
je 0x42d0fc
cmp ax, dx
jne 0x42d240
test esi, esi
je 0x42d231
movzx eax, word [ecx + 2]
lea edx, [eax - 0x61]
cmp edx, 0x15
ja case.0x42d190.99
movzx edx, byte [edx + 0x42d4a8]
jmp dword [edx*4 + 0x42d488]
mov eax, 7
mov word [ebx], ax
add ecx, 2
add ebx, 2
add ecx, 2
jmp 0x42d0b0
mov edx, 8
mov word [ebx], dx
add ecx, 2
add ebx, 2
add ecx, 2
jmp 0x42d0b0
mov eax, 0xc
mov word [ebx], ax
add ecx, 2
add ebx, 2
add ecx, 2
jmp 0x42d0b0
mov edx, 0xa
mov word [ebx], dx
add ecx, 2
add ebx, 2
add ecx, 2
jmp 0x42d0b0
mov eax, 0xd
mov word [ebx], ax
add ecx, 2
add ebx, 2
add ecx, 2
jmp 0x42d0b0
mov edx, 9
mov word [ebx], dx
add ecx, 2
add ebx, 2
add ecx, 2
jmp 0x42d0b0
mov eax, 0xb
mov word [ebx], ax
add ecx, 2
add ebx, 2
add ecx, 2
jmp 0x42d0b0
add dword [esp + 0x10], ebp
add ecx, 2
add ecx, 2
jmp 0x42d0b0
lea edx, [ecx + 2]
mov ebp, edx
movzx eax, word [ebp]
test ax, ax
je 0x42d419
cmp ax, di
je 0x42d26b
movzx eax, word [ebp + 2]
add ebp, 2
test ax, ax
jne 0x42d252
add ecx, 2
jmp 0x42d0b0
cmp word [ebp], 0
je 0x42d419
mov edi, ebp
sub edi, ecx
sar edi, 1
dec edi
je 0x42d417
cmp edi, 0xfd
ja 0x42d417
push edi
push edx
lea ecx, [esp + 0x2c]
push ecx
call fcn.004cb3f1
xor edx, edx
add esp, 0xc
mov word [esp + edi*2 + 0x24], dx
cmp word [esp + 0x24], dx
je 0x42d421
lea eax, [esp + 0x17]
push eax
push 3
lea ecx, [esp + 0x24]
push ecx
push edi
lea edx, [esp + 0x34]
push edx
mov ecx, 0x51c0f8
call fcn.00421a00
test eax, eax
jne 0x42d2ef
cmp byte [esp + 0x17], al
mov ecx, dword [esp + 0x1c]
setne al
lea edx, [esp + 0x24]
inc eax
push eax
push ecx
push edx
push 0x51c0f8
mov ecx, edi
call fcn.00421cb0
mov esi, eax
test esi, esi
je 0x42d421
cmp byte [esi + 0x17], 0
jne 0x42d302
mov esi, dword [esi + 0xc]
cmp esi, dword [esp + 0x228]
je 0x42d413
cmp dword [esp + 0x18], 0
je 0x42d32f
push ebx
mov ecx, esi
call fcn.004af390
mov esi, dword [esp + 0x18]
mov ecx, ebp
lea ebx, [ebx + eax*2]
add ecx, 2
jmp 0x42d0b0
movzx eax, byte [esi + 0x17]
cmp eax, 3
ja case.default.0x42d33c
jmp dword [eax*4 + 0x42d4c0]
mov eax, esi
call fcn.00401610
cmp dword [0x51b038], 0
jne 0x42d3a5
cmp dword [esi + 0xc], 0
jne 0x42d3a5
mov ecx, dword [esi + 0x18]
push 0
lea eax, [esp + 0x24]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x42d38b
mov esi, dword [esp + 0x18]
dec eax
add dword [esp + 0x10], eax
mov ecx, ebp
mov dword [0x51f1c4], 0
add ecx, 2
jmp 0x42d0b0
mov dword [0x51f1c4], esi
mov esi, dword [esp + 0x18]
xor eax, eax
add dword [esp + 0x10], eax
mov ecx, ebp
add ecx, 2
jmp 0x42d0b0
mov eax, dword [esi + 0xc]
mov esi, dword [esp + 0x18]
shr eax, 1
add dword [esp + 0x10], eax
mov ecx, ebp
add ecx, 2
jmp 0x42d0b0
mov ecx, dword [esi + 0xc]
push 0
call fcn.004af390
add dword [esp + 0x10], eax
mov esi, dword [esp + 0x18]
mov ecx, ebp
add ecx, 2
jmp 0x42d0b0
push 0
mov ecx, 0x51c09c
call fcn.004046b0
cmp eax, 0xffffffff
jne 0x42d40f
mov esi, dword [esp + 0x18]
xor eax, eax
add dword [esp + 0x10], eax
mov ecx, ebp
add ecx, 2
jmp 0x42d0b0
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x10]
push edx
push 0
call eax
add esp, 8
add dword [esp + 0x10], eax
mov esi, dword [esp + 0x18]
mov ecx, ebp
add ecx, 2
jmp 0x42d0b0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x214
ret 8
mov eax, 0x51e75c
lea edx, [edi + edi]
mov dword [eax], edx
mov eax, dword [esp + 0x228]
cmp byte [eax + 0x17], 0
jne 0x42d44a
mov eax, dword [eax + 0xc]
cmp byte [eax + 0x17], 2
jne 0x42d470
cmp dword [0x51c0a8], 0
je 0x42d470
mov ecx, 0x51c09c
call fcn.004049a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x214
ret 8
and byte [eax + 0x15], 0x86
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x214
ret 8