Function at 0x4d664b
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
mov eax, ecx
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 0x28], eax
push edi
mov edi, edx
mov dword [ebp - 0x10], ecx
inc ebx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 8], ecx
cmp dword [0x519ac8], ecx
jne 0x4d669b
push ecx
push ecx
push 0x42eb6c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x4d6690
mov dword [0x519ac4], ebx
mov dword [0x519ac0], ebx
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov dword [0x519ac8], ebx
cmp dword [0x519ac0], 0
jne 0x4d66ab
mov byte [ebp - 2], cl
test edi, edi
jns 0x4d66ae
mov byte [ebp - 2], bl
mov esi, dword [ebp + 0x18]
test eax, eax
mov ebx, edi
setne byte [ebp - 1]
shr ebx, 0x1d
not bl
mov edx, dword [esi + 0xc]
and bl, 1
test edx, edx
je 0x4d66df
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx]
cmp dword [eax + 4], 0
je 0x4d66d7
mov byte [ebp - 1], 1
add ecx, 4
sub edx, 1
jne 0x4d66cb
push 0x40000004
call dword [sym.imp.certcli.dll_Ordinal_205]
test eax, eax
jne 0x4d6711
cmp dword [0x519ac4], eax
jne 0x4d6711
mov eax, 0x40000000
test eax, edi
jne 0x4d6711
push eax
call dword [sym.imp.certcli.dll_Ordinal_205]
test eax, eax
jne 0x4d6715
xor al, al
mov byte [ebp - 1], al
jmp 0x4d6718
mov al, 1
jmp 0x4d670c
mov al, byte [ebp - 1]
mov dl, byte [ebp - 2]
test dl, dl
jne 0x4d672d
test al, al
jne 0x4d6731
cmp dword [ebp + 0x10], 0
je 0x4d6c1e
test al, al
je 0x4d6795
test bl, bl
je 0x4d6745
push 0x42eb88
push 0xffffffffffffffff
call dword [sym.imp.certcli.dll_Ordinal_203]
pop ecx
jmp 0x4d674f
push 0x42ebb0
call fcn.004c5942
mov edx, dword [esi + 8]
pop ecx
push 0x513800
push 0x42ebfc
mov cl, bl
call fcn.004d5853
mov edx, dword [esi + 4]
mov cl, bl
push 0x5138c0
push 0x42ec30
call fcn.004d5853
cmp dword [esi], 0x24
jb 0x4d6792
cmp dword [esi + 0x1c], 0
je 0x4d6792
push dword [esi + 0x20]
mov edx, 0x42ec68
mov cl, bl
call fcn.004d650d
mov dl, byte [ebp - 2]
xor eax, eax
mov dword [ebp - 0x18], eax
cmp dword [esi + 0xc], eax
jbe 0x4d6b46
mov ecx, dword [esi + 0x10]
mov edi, eax
shl edi, 2
mov dword [ebp - 0x14], edi
test dl, dl
je 0x4d67d0
mov edx, dword [0x519abc]
push dword [ebp - 0x18]
mov ecx, dword [edi + ecx]
lea eax, [edx + 1]
mov dword [0x519abc], eax
call fcn.004d5a66
mov ecx, dword [esi + 0x10]
jmp 0x4d67d3
mov dword [ebp - 0x14], edi
cmp byte [ebp - 1], 0
je 0x4d682a
mov edx, dword [edi + ecx]
mov cl, bl
push 0x513800
push 0x42ecb8
mov edx, dword [edx + 8]
call fcn.004d5853
mov eax, dword [esi + 0x10]
mov cl, bl
push 0x5138c0
push 0x42ecec
mov edx, dword [eax + edi]
mov edx, dword [edx + 4]
call fcn.004d5853
mov eax, dword [esi + 0x10]
mov eax, dword [edi + eax]
cmp dword [eax], 0x20
jb 0x4d682a
cmp dword [eax + 0x18], 0
je 0x4d682a
push dword [eax + 0x1c]
mov edx, 0x42ed20
mov cl, bl
call fcn.004d650d
cmp dword [ebp - 8], 0
je 0x4d683d
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
and dword [ebp - 8], 0
cmp dword [ebp - 0x10], 0
je 0x4d6852
push 0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
and dword [ebp - 0x10], 0
lea edx, [ebp - 8]
lea ecx, [ebp - 0x10]
call fcn.004d5d4a
test eax, eax
je 0x4d686d
push eax
push 0x139f01a3
call dword [sym.imp.certcli.dll_Ordinal_357]
mov ecx, dword [esi + 0x10]
xor edx, edx
mov dword [ebp - 0xc], edx
mov eax, dword [ecx + edi]
cmp dword [eax + 0xc], edx
jbe 0x4d6b30
cmp byte [ebp - 1], 0
mov eax, dword [edi + ecx]
mov eax, dword [eax + 0x10]
mov edi, dword [eax + edx*4]
jne 0x4d68a2
cmp dword [ebp - 0x28], 0
jne 0x4d68a2
cmp dword [edi + 8], 0
jne 0x4d68a2
mov byte [ebp - 3], 0
jmp 0x4d6919
mov byte [ebp - 3], 1
push dword [edi + 8]
push dword [edi + 0xc]
push edx
push dword [ebp - 0x18]
test bl, bl
je 0x4d68c6
push 0x42ed6c
push 0xffffffffffffffff
call dword [sym.imp.certcli.dll_Ordinal_203]
add esp, 0x18
jmp 0x4d68d3
push 0x42eda8
call fcn.004c5942
add esp, 0x14
push ecx
mov ecx, dword [edi + 4]
mov dl, bl
call fcn.004d62b9
test eax, eax
je 0x4d68ee
push eax
push 0x13b601a3
call dword [sym.imp.certcli.dll_Ordinal_357]
mov edx, dword [edi + 0xc]
mov cl, bl
push 0x513800
push 0x42ee18
call fcn.004d5853
mov edx, dword [edi + 8]
mov cl, bl
push 0x5138c0
push 0x42ee48
call fcn.004d5853
mov ecx, dword [esi + 0x10]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4d6941
mov edx, dword [ebp - 0x14]
mov eax, dword [eax]
push dword [edx + ecx]
mov esi, dword [eax + 4]
mov ecx, esi
push dword [ebp - 0xc]
push dword [ebp - 0x2c]
call dword [0x51cbac]
mov ecx, dword [ebp + 0x10]
call esi
mov esi, dword [ebp + 0x18]
cmp byte [ebp - 3], 0
je 0x4d6b17
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4d69a6
cmp dword [eax], 0x1c
jb 0x4d69a6
mov eax, dword [eax + 0x18]
test eax, eax
je 0x4d69a6
push dword [ebp - 8]
xor edx, edx
mov cl, bl
push dword [eax + 4]
call fcn.004d63b1
test eax, eax
je 0x4d6980
push eax
push 0x13d601a3
call dword [sym.imp.certcli.dll_Ordinal_357]
mov eax, dword [ebp - 0x24]
xor edx, edx
push dword [ebp - 8]
inc edx
mov cl, bl
mov eax, dword [eax + 0x18]
push dword [eax + 8]
call fcn.004d63b1
test eax, eax
je 0x4d69a6
push eax
push 0x13dd01a3
call dword [sym.imp.certcli.dll_Ordinal_357]
cmp dword [edi], 0x18
jb 0x4d69ba
push dword [edi + 0x14]
mov edx, 0x42ee78
mov cl, bl
call fcn.004d58b1
cmp dword [edi], 0x1c
jb 0x4d69ce
push dword [edi + 0x18]
mov edx, 0x42ee90
mov cl, bl
call fcn.004d58b1
test byte [edi + 0xc], 8
je 0x4d6a71
mov ecx, dword [edi + 4]
lea edx, [ebp - 0x24]
and dword [ebp - 0x24], 0
call fcn.004d65c9
test eax, eax
je 0x4d69f7
push eax
push 0x13ef01a3
call dword [sym.imp.certcli.dll_Ordinal_357]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4d6a6a
and dword [ebp - 0x1c], 0
cmp dword [eax], 0
jbe 0x4d6a6a
xor ecx, ecx
mov esi, eax
mov dword [ebp - 0x20], ecx
mov eax, dword [esi + 4]
mov edx, dword [ecx + eax]
xor ecx, ecx
call fcn.004d3a20
mov ecx, dword [ebp - 0x20]
push eax
mov eax, dword [esi + 4]
push dword [ecx + eax]
push dword [ebp - 0x1c]
push 0x42eeac
test bl, bl
je 0x4d6a43
push 0x42e8e0
push 0xffffffffffffffff
call dword [sym.imp.certcli.dll_Ordinal_203]
add esp, 0x18
jmp 0x4d6a50
push 0x42e8f4
call fcn.004c5942
add esp, 0x14
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
inc edx
add ecx, 0xc
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], ecx
cmp edx, dword [esi]
jb 0x4d6a0e
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [edi], 0x20
jb 0x4d6aa0
mov eax, dword [edi + 0x1c]
test eax, eax
je 0x4d6aa0
push eax
test bl, bl
je 0x4d6a94
push 0x42eeb8
push 0xffffffffffffffff
call dword [sym.imp.certcli.dll_Ordinal_203]
add esp, 0xc
jmp 0x4d6aa0
push 0x40c9ac
call fcn.004c5942
pop ecx
pop ecx
mov eax, dword [esi + 0x10]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
inc ecx
mov eax, dword [eax + edx]
cmp ecx, dword [eax + 0xc]
jne 0x4d6ac1
mov edx, dword [ebp - 8]
mov cl, bl
push 0x42eec0
call fcn.004d6008
mov edx, dword [edi + 4]
mov ecx, dword [ebp - 8]
push dword [edx + 8]
mov edx, dword [edx + 4]
call fcn.004d5fcc
test eax, eax
je 0x4d6ae2
push eax
push 0x140601a3
call dword [sym.imp.certcli.dll_Ordinal_357]
mov eax, dword [esi + 0x10]
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edi]
lea ecx, [edx + 1]
cmp ecx, dword [eax + 0xc]
jne 0x4d6b1d
mov edx, dword [ebp - 8]
mov cl, bl
push 0x42eed4
call fcn.004d6008
test eax, eax
je 0x4d6b1a
push eax
push 0x140b01a3
call dword [sym.imp.certcli.dll_Ordinal_357]
jmp 0x4d6b1a
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
mov ecx, dword [esi + 0x10]
inc edx
mov dword [ebp - 0xc], edx
mov eax, dword [ecx + edi]
cmp edx, dword [eax + 0xc]
jb 0x4d6881
mov eax, dword [ebp - 0x18]
mov dl, byte [ebp - 2]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, dword [esi + 0xc]
jb 0x4d67a6
mov edi, dword [ebp - 0x2c]
cmp byte [ebp - 1], 0
je 0x4d6bfe
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4d6bc5
push 1
push eax
call dword [sym.imp.certcli.dll_Ordinal_207]
mov esi, eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4d6b8c
push eax
test bl, bl
je 0x4d6b80
push 0x42eee0
push 0xffffffffffffffff
call dword [sym.imp.certcli.dll_Ordinal_203]
add esp, 0xc
jmp 0x4d6b8c
push 0x42eef8
call fcn.004c5942
pop ecx
pop ecx
push ecx
mov ecx, dword [ebp + 0xc]
mov dl, bl
call fcn.004d62b9
test esi, esi
je 0x4d6bc5
push esi
test bl, bl
je 0x4d6bb2
push 0x42ef24
push 0xffffffffffffffff
call dword [sym.imp.certcli.dll_Ordinal_203]
add esp, 0xc
jmp 0x4d6bbe
push 0x405204
call fcn.004c5942
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test edi, 0x1000
je 0x4d6c25
cmp dword [ebp + 8], 0
je 0x4d6c25
test bl, bl
je 0x4d6be8
push 0x42ef2c
push 0xffffffffffffffff
call dword [sym.imp.certcli.dll_Ordinal_203]
pop ecx
pop ecx
jmp 0x4d6c29
push 0x42ef38
call fcn.004c5942
pop ecx
push 0x42ef78
call fcn.004c5942
pop ecx
cmp dword [ebp - 8], 0
je 0x4d6c0d
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp dword [ebp - 0x10], 0
je 0x4d6c1e
push 0
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop esi
pop ebx
leave
ret 0x14
test bl, bl
je 0x4d6bf3
push 0x42ef4c
push 0xffffffffffffffff
call dword [sym.imp.certcli.dll_Ordinal_203]
pop ecx
jmp 0x4d6bfd