Function at 0x508688
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebx + 8]
test ecx, ecx
je 0x508fa7
mov edx, dword [ebx + 0x20]
mov dword [ebp - 0x34], edx
mov edx, dword [ebx + 0x54]
test edx, edx
je 0x508af0
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x508ae8
mov dword [esp], eax
call fcn.004f41bc
mov edi, eax
test eax, eax
je 0x508b4c
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f4244
mov esi, eax
lea eax, [eax - 1]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f425c
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ecx + 0x18]
mov dword [ebp - 0x2c], ecx
cmp esi, ecx
jg 0x508828
mov ecx, eax
mov dword [esp], ecx
mov dword [ebp - 0x54], ecx
call fcn.004f5bd8
mov ecx, dword [ebp - 0x54]
mov dword [esp + 8], ecx
mov dword [esp + 4], ecx
mov dword [esp], ebx
call dword [ebx + 0x28]
test eax, eax
mov ecx, dword [ebp - 0x54]
jne 0x508828
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x508828
mov edx, edi
mov eax, ebx
call fcn.005070d8
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x508828
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f4084
test eax, eax
jne 0x5087d8
mov dword [esp + 0x10], 0xdb
mov dword [esp + 0xc], str.crypto_x509_x509_vfy.c
mov dword [esp + 8], 0x41
mov dword [esp + 4], 0x7f
mov dword [esp], 0xb
call fcn.004f33a4
mov dword [ebp - 0x30], 0
mov eax, dword [ebx + 0x54]
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.00508540
xor eax, eax
test edi, edi
je 0x5087b8
mov dword [esp], edi
mov dword [ebp - 0x54], eax
call fcn.004f4144
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x30]
test edx, edx
je 0x5087d0
mov edx, dword [ebp - 0x30]
mov dword [esp], edx
mov dword [ebp - 0x54], eax
call fcn.004eb870
mov eax, dword [ebp - 0x54]
add esp, 0x6c
pop ebx
pop esi
pop edi
leave
ret
mov dword [esp + 0x10], 0xde
mov dword [esp + 0xc], str.crypto_x509_x509_vfy.c
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x1c]
add eax, 0x10
mov dword [esp], eax
call fcn.004f4a0c
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.004f4048
inc dword [ebx + 0x50]
mov ecx, dword [ebp - 0x1c]
inc esi
cmp dword [ebp - 0x2c], esi
jge 0x508705
lea esi, [esi]
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f4244
dec eax
mov dword [ebp - 0x30], eax
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f425c
mov dword [esp], eax
mov dword [ebp - 0x54], eax
call fcn.004f5be8
mov ecx, dword [ebp - 0x54]
mov dword [esp + 8], ecx
mov dword [esp + 4], ecx
mov dword [esp], ebx
call dword [ebx + 0x28]
test eax, eax
mov ecx, dword [ebp - 0x54]
jne 0x508c88
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x30], 0
cmp dword [ebp - 0x2c], esi
jl 0x5088eb
mov dword [ebp - 0x3c], edi
mov edi, esi
mov esi, ebx
mov ebx, ecx
jmp 0x5088c8
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
lea ecx, [ebp - 0x1c]
mov dword [esp], ecx
call dword [esi + 0x24]
cmp eax, 0
jl 0x5087d0
je 0x5088e2
mov ebx, dword [ebp - 0x1c]
mov dword [esp + 4], ebx
mov eax, dword [esi + 0x54]
mov dword [esp], eax
call fcn.004f4084
test eax, eax
je 0x508cd0
inc edi
cmp dword [ebp - 0x2c], edi
jl 0x5088e2
mov dword [esp], ebx
call fcn.004f5bd8
mov dword [esp + 8], ebx
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [esi + 0x28]
test eax, eax
je 0x50888c
mov ecx, ebx
mov ebx, esi
mov esi, edi
mov edi, dword [ebp - 0x3c]
mov dword [esp], ecx
mov dword [ebp - 0x54], ecx
call fcn.004f5bd8
mov ecx, dword [ebp - 0x54]
mov dword [esp + 8], ecx
mov dword [esp + 4], ecx
mov dword [esp], ebx
call dword [ebx + 0x28]
test eax, eax
mov ecx, dword [ebp - 0x54]
jne 0x508965
mov edx, dword [ebp - 0x30]
test edx, edx
je 0x508931
mov eax, dword [ebp - 0x30]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], ebx
call dword [ebx + 0x28]
test eax, eax
mov ecx, dword [ebp - 0x54]
jne 0x508e38
cmp dword [ebx + 0x50], esi
jl 0x508e2c
mov dword [ebx + 0x64], 0x14
mov dword [ebx + 0x68], ecx
dec esi
mov dword [ebx + 0x60], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp - 0x34]
test eax, eax
je 0x508791
mov dword [ebp - 0x4c], 1
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x34], eax
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x508f78
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], 6
mov esi, dword [ebx + 0x50]
test esi, esi
jle 0x508d13
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x2c], 0xffffffff
xor eax, eax
mov dword [ebp - 0x50], edi
mov edi, eax
jmp 0x5089d4
mov eax, dword [esi + 0x24]
cmp eax, 0xffffffff
je 0x5089c0
cmp eax, edi
jl 0x508c60
inc dword [ebp - 0x40]
mov dword [ebp - 0x2c], 0
inc edi
cmp edi, dword [ebx + 0x50]
jge 0x508d10
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f425c
mov esi, eax
mov eax, dword [ebx + 0x14]
test byte [eax + 0xc], 0x10
jne 0x5089f8
test byte [esi + 0x29], 2
jne 0x508c38
mov ecx, dword [ebp - 0x44]
test ecx, ecx
jne 0x508a09
test byte [esi + 0x29], 4
jne 0x508c0c
mov dword [esp], esi
call fcn.004fa088
cmp dword [ebp - 0x2c], 0xffffffff
je 0x508bec
mov edx, dword [ebp - 0x2c]
test edx, edx
jne 0x508bc8
test eax, eax
je 0x508a4d
mov dword [ebx + 0x64], 0x25
mov dword [ebx + 0x60], edi
mov dword [ebx + 0x68], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp - 0x34]
test eax, eax
je 0x508c30
mov edx, dword [ebx + 0x14]
mov ecx, dword [edx + 0x10]
test ecx, ecx
jle 0x508aa6
xor eax, eax
cmp dword [ebp - 0x2c], 0
setg al
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x48]
mov dword [esp + 4], ecx
mov dword [esp], esi
call fcn.004f9fd0
test eax, eax
je 0x508a83
mov edx, dword [ebx + 0x14]
test byte [edx + 0xc], 0x20
je 0x508aa6
dec eax
je 0x508aa6
mov dword [ebx + 0x64], 0x1a
mov dword [ebx + 0x60], edi
mov dword [ebx + 0x68], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp - 0x34]
test eax, eax
je 0x508c30
cmp edi, 1
jle 0x508bb7
mov eax, dword [esi + 0x28]
test al, 0x20
jne 0x508ad1
mov edx, dword [esi + 0x20]
cmp edx, 0xffffffff
je 0x508ace
mov ecx, dword [ebp - 0x40]
lea edx, [ecx + edx + 1]
cmp dword [ebp - 0x3c], edx
jg 0x508b98
inc dword [ebp - 0x3c]
test ah, 4
jne 0x5089b0
mov dword [ebp - 0x2c], 1
jmp 0x5089ca
xor edi, edi
jmp 0x5086d3
call fcn.004f3f54
mov dword [ebx + 0x54], eax
test eax, eax
je 0x508b0f
mov edx, dword [ebx + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004f4084
test eax, eax
jne 0x508b5c
mov dword [esp + 0x10], 0xb2
mov dword [esp + 0xc], str.crypto_x509_x509_vfy.c
mov dword [esp + 8], 0x41
mov dword [esp + 4], 0x7f
mov dword [esp], 0xb
call fcn.004f33a4
xor edi, edi
mov dword [ebp - 0x30], 0
jmp 0x508791
mov dword [esp + 0x10], 0xbd
jmp 0x508766
mov dword [esp + 0x10], 0xb5
mov dword [esp + 0xc], str.crypto_x509_x509_vfy.c
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov eax, dword [ebx + 8]
add eax, 0x10
mov dword [esp], eax
call fcn.004f4a0c
mov dword [ebx + 0x50], 1
jmp 0x5086b6
mov dword [ebx + 0x64], 0x19
mov dword [ebx + 0x60], edi
mov dword [ebx + 0x68], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp - 0x34]
test eax, eax
je 0x508c30
mov eax, dword [esi + 0x28]
test al, 0x20
je 0x508ace
jmp 0x508ad1
test eax, eax
je 0x508be0
mov edx, dword [ebx + 0x14]
test byte [edx + 0xc], 0x20
je 0x508a50
dec eax
je 0x508a50
mov dword [ebx + 0x64], 0x18
jmp 0x508a31
mov edx, dword [ebx + 0x14]
test byte [edx + 0xc], 0x20
je 0x508a50
cmp eax, 1
je 0x508a50
test eax, eax
je 0x508a50
jmp 0x508be0
mov dword [ebx + 0x64], 0x28
mov dword [ebx + 0x60], edi
mov dword [ebx + 0x68], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp - 0x34]
test eax, eax
jne 0x508a09
nop
mov edi, dword [ebp - 0x50]
jmp 0x508791
mov dword [ebx + 0x64], 0x22
mov dword [ebx + 0x60], edi
mov dword [ebx + 0x68], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp - 0x34]
test eax, eax
jne 0x5089f8
jmp 0x508c30
mov dword [ebx + 0x64], 0x26
mov dword [ebx + 0x60], edi
mov dword [ebx + 0x68], esi
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp - 0x34]
test eax, eax
jne 0x5089c0
jmp 0x508c30
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f4244
dec eax
mov ecx, dword [ebp - 0x54]
je 0x508e67
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f40f4
mov dword [ebp - 0x30], eax
dec dword [ebx + 0x50]
dec esi
lea eax, [esi - 1]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f425c
mov ecx, eax
mov dword [ebp - 0x4c], 0
jmp 0x50887b
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.004eb870
mov dword [esp + 0x10], 0x132
mov dword [esp + 0xc], str.crypto_x509_x509_vfy.c
mov dword [esp + 8], 0x41
mov dword [esp + 4], 0x7f
mov dword [esp], 0xb
call fcn.004f33a4
xor eax, eax
jmp 0x5087d0
mov edi, dword [ebp - 0x50]
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f4244
dec eax
js 0x508dba
mov dword [ebp - 0x34], edi
mov edi, eax
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f425c
mov dword [ebp - 0x2c], eax
test edi, edi
je 0x508d46
test byte [eax + 0x28], 0x20
jne 0x508db0
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f4244
lea esi, [eax - 1]
cmp esi, edi
jg 0x508d61
jmp 0x508db0
dec esi
cmp esi, edi
jle 0x508db0
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f425c
mov eax, dword [eax + 0x4c]
test eax, eax
je 0x508d5c
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call fcn.00515040
test eax, eax
je 0x508d5c
mov dword [ebx + 0x64], eax
mov dword [ebx + 0x60], edi
mov edx, dword [ebp - 0x2c]
mov dword [ebx + 0x68], edx
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebx + 0x20]
test eax, eax
jne 0x508d5c
mov edi, dword [ebp - 0x34]
jmp 0x508791
dec edi
jns 0x508d2a
mov edi, dword [ebp - 0x34]
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 0x14]
test eax, eax
jg 0x508ef9
mov eax, dword [ebx + 0x54]
mov dword [esp + 4], eax
mov dword [esp], 0
call fcn.00508540
mov dword [esp], ebx
call dword [ebx + 0x2c]
test eax, eax
je 0x508791
mov eax, dword [ebx + 0x1c]
test eax, eax
je 0x509044
mov dword [esp], ebx
call eax
test eax, eax
je 0x508791
cmp dword [ebp - 0x4c], 0
jne 0x5087a6
mov edx, dword [ebx + 0x14]
test byte [edx + 0xc], 0x80
je 0x5087a6
mov dword [esp], ebx
call dword [ebx + 0x3c]
test eax, eax
je 0x508791
jmp 0x5087a6
mov dword [ebx + 0x64], 2
jmp 0x508941
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f4084
inc esi
mov dword [ebx + 0x50], esi
mov ecx, dword [ebp - 0x30]
mov dword [ebx + 0x68], ecx
mov dword [ebx + 0x64], 0x13
mov dword [ebp - 0x30], 0
jmp 0x508944
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call dword [ebx + 0x24]
mov edx, eax
test eax, eax
mov ecx, dword [ebp - 0x54]
jle 0x508ee7
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [ebp - 0x58], edx
call fcn.004f5c08
test eax, eax
mov edx, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x54]
je 0x508fdd
mov dword [ebx + 0x64], 0x12
mov dword [ebx + 0x68], ecx
mov eax, dword [ebp - 0x30]
mov dword [ebx + 0x60], eax
dec edx
je 0x50901e
mov dword [esp + 4], ebx
mov dword [esp], 0
mov dword [ebp - 0x54], ecx
call dword [ebp - 0x34]
test eax, eax
mov ecx, dword [ebp - 0x54]
je 0x50878a
mov dword [ebp - 0x4c], 1
mov dword [ebp - 0x30], 0
jmp 0x50887b
mov dword [ebx + 0x64], 0x12
mov dword [ebx + 0x68], ecx
mov eax, dword [ebp - 0x30]
mov dword [ebx + 0x60], eax
jmp 0x508eb8
mov ecx, dword [ebx + 0x20]
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
call fcn.004f4244
lea edx, [eax - 1]
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
mov dword [ebp - 0x58], edx
call fcn.004f425c
mov esi, eax
mov dword [esp + 8], 0
mov eax, dword [ebx + 0x14]
mov eax, dword [eax + 0x14]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00530d74
cmp eax, 1
mov edx, dword [ebp - 0x58]
je 0x508dc8
mov dword [ebx + 0x60], edx
mov dword [ebx + 0x68], esi
cmp eax, 2
sete al
movzx eax, al
add eax, 0x1b
mov dword [ebx + 0x64], eax
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [ebp - 0x2c]
test eax, eax
je 0x508791
jmp 0x508dc8
mov eax, dword [ebx + 0x14]
mov esi, dword [eax + 0xc]
mov dword [esp], str.OPENSSL_ALLOW_PROXY_CERTS
call sub.msvcrt.dll_getenv
test eax, eax
je 0x509031
mov dword [ebp - 0x44], 1
mov eax, dword [ebx + 0x14]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x48], eax
jmp 0x508984
mov dword [esp + 0x10], 0xa5
mov dword [esp + 0xc], str.crypto_x509_x509_vfy.c
mov dword [esp + 8], 0x69
mov dword [esp + 4], 0x7f
mov dword [esp], 0xb
call fcn.004f33a4
mov eax, 0xffffffff
jmp 0x5087d0
mov dword [esp], ecx
call fcn.004eb870
mov ecx, dword [ebp - 0x1c]
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], edx
mov eax, dword [ebx + 0x54]
mov dword [esp], eax
mov dword [ebp - 0x54], ecx
call fcn.004f4280
mov dword [ebx + 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x30], 0
mov ecx, dword [ebp - 0x54]
jmp 0x50887b
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call fcn.004eb870
mov ecx, dword [ebp - 0x54]
jmp 0x508eb8
xor edx, edx
test esi, 0x40
setne dl
mov dword [ebp - 0x44], edx
jmp 0x508f99
mov dword [esp], ebx
call fcn.00508290
jmp 0x508df9