Function at 0x510920
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10
call fcn.0062f130
mov eax, dword [0x6d3f68]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 0
push str.OPENSSL_WIN32_UTF8
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x510b6c
mov ebx, 8
mov dword [ebp - 8], 0
xor esi, esi
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_GetACP]
mov edi, eax
cmp edi, 0xc42c
je 0x5109b7
cmp edi, 0xc42d
je 0x5109b7
cmp edi, 0xc42e
je 0x5109b7
cmp edi, 0xc431
je 0x5109b7
cmp edi, 0xc433
je 0x5109b7
cmp edi, 0xc435
je 0x5109b7
cmp edi, 0xdeaa
jb 0x5109aa
cmp edi, 0xdeb3
jbe 0x5109b7
cmp edi, 0xfde8
je 0x5109b7
cmp edi, 0x2a
jne 0x5109bc
xor ebx, ebx
mov dword [ebp - 0x10], ebx
push 0
push 0
push 0xffffffffffffffff
push dword [ebp + 8]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x510b55
add eax, eax
lea ecx, [eax + 8]
cmp eax, ecx
sbb eax, eax
and eax, ecx
je 0x510b55
cmp eax, 0x400
ja 0x510a07
call fcn.0062f510
mov ebx, esp
test ebx, ebx
je 0x510b55
mov dword [ebx], 0xcccc
jmp 0x510a21
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x510b55
mov dword [ebx], 0xdddd
add ebx, 8
test ebx, ebx
je 0x510b55
push dword [ebp - 0xc]
push ebx
push 0xffffffffffffffff
push dword [ebp + 8]
push dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x510b29
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test edi, edi
je 0x510b29
lea eax, [edi + edi]
lea ecx, [eax + 8]
cmp eax, ecx
sbb eax, eax
and eax, ecx
je 0x510b27
cmp eax, 0x400
ja 0x510a8c
call fcn.0062f510
mov esi, esp
test esi, esi
je 0x510b29
mov dword [esi], 0xcccc
jmp 0x510aa6
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x510b29
mov dword [esi], 0xdddd
add esi, 8
test esi, esi
je 0x510b29
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, edi
jae 0x510b29
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x510b29
push 0x46
push str.cryptogetenv.c
push eax
call fcn.004d9090
mov edi, eax
add esp, 0xc
mov dword [ebp - 8], edi
test edi, edi
je 0x510b29
push 0
push 0
push dword [ebp - 0xc]
push edi
push 0xffffffffffffffff
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x510b29
push 0x4c
push str.cryptogetenv.c
push edi
call fcn.004d90c0
add esp, 0xc
mov dword [ebp - 8], 0
jmp 0x510b29
xor esi, esi
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add ebx, 0xfffffff8
cmp dword [ebx], 0xdddd
jne 0x510b40
push ebx
call edi
add esp, 4
test esi, esi
je 0x510b55
add esi, 0xfffffff8
cmp dword [esi], 0xdddd
jne 0x510b55
push esi
call edi
add esp, 4
mov eax, dword [ebp - 8]
lea esp, [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0062e5ad
mov esp, ebp
pop ebp
ret
call fcn.0046cd60
test eax, eax
je 0x510b8b
xor eax, eax
lea esp, [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0062e5ad
mov esp, ebp
pop ebp
ret
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
add esp, 4
lea esp, [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0062e5ad
mov esp, ebp
pop ebp
ret