Function at 0x41dd60
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b7af5
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4e72c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
sub esp, 8
mov edi, dword [ebp + 0xc]
mov edx, esp
mov dword [ebp - 0x5c], edi
mov dword [edx], esi
test esi, esi
jne 0x41dda3
xor ecx, ecx
jmp 0x41ddb4
mov ecx, esi
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41dda8
sub ecx, edi
mov edi, dword [ebp - 0x5c]
lea eax, [ebp - 0x40]
mov dword [edx + 4], ecx
push eax
call fcn.00404494
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x41ddcb
mov eax, dword [eax]
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [ebp - 0x2c]
mov ebx, eax
cmp edx, 8
jb 0x41de14
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41de0a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41de0a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040182a
add esp, 8
test ebx, ebx
jne 0x41de1f
xor al, al
jmp 0x41df69
test edi, edi
je 0x41df67
xor ecx, ecx
mov eax, ebx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00402824
mov edi, eax
mov dword [ebp - 0x60], edi
mov dword [ebp - 4], 0
push ecx
mov ecx, esp
mov dword [ecx], esi
test esi, esi
je 0x41de60
lea edx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x41de57
sub esi, edx
lea eax, [ebp - 0x40]
mov dword [ecx + 4], esi
push eax
call fcn.00404494
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x41de77
mov eax, dword [eax]
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x41debc
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41deb2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41deb2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040182a
add esp, 8
mov ecx, edi
mov dword [ebp - 0x28], 0
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41dee0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x28]
call fcn.00401168
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00402bb2
mov ecx, dword [ebp - 0x5c]
add esp, 8
push eax
call fcn.00403f8f
lea ecx, [ebp - 0x58]
call fcn.0040305d
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x41df5a
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41df50
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41df50
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0040182a
add esp, 8
test edi, edi
je 0x41df67
push edi
call fcn.0040392c
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040282e
mov esp, ebp
pop ebp
ret 8