Function at 0x50bef1
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x5368
call fcn.005a812c
sub esp, eax
mov eax, dword [esp + eax]
mov dword [ebp - 0x531c], eax
mov dword [ebp - 0x5330], edx
mov dword [ebp - 0x5310], 0x5f8971
mov dword [ebp - 0x5314], 0x5f8971
test edx, edx
je 0x50bfe5
mov eax, edx
call fcn.00506d0d
mov dword [ebp - 0x5320], eax
test eax, eax
jne 0x50bf84
cmp dword [0x5af06c], 0
jne 0x50bf58
mov dword [ebp - 0x5328], 0xfffffffc
jmp 0x50c7dc
mov dword [0x611418], 1
mov dword [0x611414], 5
mov eax, dword [ebp - 0x5330]
mov dword [esp + 4], eax
mov dword [esp], str._CENC_ISMA__Cannot_open_or_validate_xml_file__s_n
call fcn.004268ea
jmp 0x50bf49
mov eax, dword [ebp - 0x5320]
mov ebx, dword [eax]
xor eax, eax
mov dword [ebp - 0x5338], eax
test ebx, ebx
je 0x50bfa1
mov eax, dword [ebx + 4]
mov dword [ebp - 0x5338], eax
mov eax, dword [ebp - 0x5320]
mov eax, dword [eax + 4]
mov dword [ebp - 0x532c], eax
test eax, eax
je 0x50bff9
xor eax, eax
mov dword [ebp - 0x532c], eax
mov ecx, dword [ebp - 0x5338]
cmp dword [ebp - 0x532c], ecx
je 0x50bff9
mov edx, dword [ebp - 0x532c]
mov eax, ebx
call fcn.00425c8e
cmp dword [eax + 4], 0
je 0x50bff9
inc dword [ebp - 0x532c]
jmp 0x50bfbc
xor eax, eax
mov dword [ebp - 0x5320], eax
mov dword [ebp - 0x5338], eax
mov dword [ebp - 0x532c], eax
mov eax, dword [ebp - 0x531c]
call fcn.0049c0a3
mov dword [ebp - 0x534c], eax
xor edi, edi
mov dword [ebp - 0x5344], edi
mov dword [ebp - 0x5340], edi
mov dword [ebp - 0x5324], edi
mov dword [ebp - 0x5328], edi
mov edi, dword [ebp - 0x534c]
cmp dword [ebp - 0x5324], edi
je 0x50c71e
inc dword [ebp - 0x5324]
mov edx, dword [ebp - 0x5324]
mov eax, dword [ebp - 0x531c]
call fcn.0049c0c2
mov dword [ebp - 0x5334], eax
mov edx, dword [ebp - 0x5324]
mov eax, dword [ebp - 0x531c]
call fcn.00575a0d
mov ebx, eax
mov dword [ebp - 0x530c], eax
xor esi, esi
test eax, eax
je 0x50c024
mov eax, dword [ebp - 0x5338]
cmp esi, eax
je 0x50c099
mov edx, esi
mov eax, dword [ebp - 0x5320]
mov eax, dword [eax]
call fcn.00425c8e
mov ecx, dword [ebp - 0x5334]
cmp dword [eax + 4], ecx
je 0x50c0b8
inc esi
jmp 0x50c072
cmp dword [ebp - 0x5330], 0
je 0x50c0b2
mov eax, dword [ebp - 0x5320]
cmp dword [eax + 4], 0
je 0x50c024
mov esi, dword [ebp - 0x532c]
cmp dword [ebp - 0x5338], 0
je 0x50c0e3
mov edx, esi
mov eax, dword [ebp - 0x5320]
mov eax, dword [eax]
call fcn.00425c8e
mov esi, eax
lea edx, [ebp - 0x4eec]
mov ecx, 0x13b5
mov edi, edx
rep movsd dword es:[edi], dword [esi]
jmp 0x50c104
lea edx, [ebp - 0x4eec]
mov ecx, 0x13b5
mov edi, edx
mov eax, dword [ebp - 0x5338]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x5334]
mov dword [ebp - 0x4ee8], eax
mov eax, dword [ebp - 0x5320]
mov eax, dword [eax + 0xc]
cmp eax, 0x63656e63
je 0x50c13d
ja 0x50c12d
cmp eax, 0x63626331
je 0x50c147
cmp eax, 0x63626373
je 0x50c147
cmp eax, 0x61646b6d
je 0x50c18f
jmp 0x50c15d
cmp eax, 0x63656e73
je 0x50c13d
cmp eax, 0x69414543
je 0x50c19b
jmp 0x50c15d
mov dword [ebp - 0x13ac], 1
mov dword [ebp - 0x533c], 0x503f23
mov dword [ebp - 0x5344], 1
jmp 0x50c1a5
cmp dword [0x5af06c], 0
je 0x50bf49
mov dword [0x611418], 1
mov dword [0x611414], 5
mov dword [esp], str._CENC_ISMA__Encryption_type_not_supported_n
call fcn.004268ea
jmp 0x50bf49
mov dword [ebp - 0x533c], 0x50739c
jmp 0x50c1a5
mov dword [ebp - 0x533c], 0x501bd7
mov edx, dword [ebp - 0x5324]
mov eax, dword [ebp - 0x531c]
call fcn.0057587b
test eax, eax
je 0x50c209
xor ebx, ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
lea eax, [ebp - 0x5314]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x5310]
mov dword [esp + 8], eax
xor esi, esi
mov dword [esp + 4], esi
lea eax, [ebp - 0x530c]
mov dword [esp], eax
xor ecx, ecx
mov edx, dword [ebp - 0x5324]
mov eax, dword [ebp - 0x531c]
call fcn.00579d8e
mov dword [ebp - 0x5328], eax
jmp 0x50c2db
mov edx, dword [ebp - 0x5324]
mov eax, dword [ebp - 0x531c]
call fcn.005758c2
test eax, eax
je 0x50c26f
cmp dword [ebp - 0x5330], 0
jne 0x50c259
cmp dword [0x5af06c], 0
je 0x50c024
mov dword [0x611418], 1
mov dword [0x611414], 5
mov dword [esp], str._CENC_ISMA__Cannot_decrypt_OMA__P_DCF_file_without_GPACs_DRM_file__keys_n
call fcn.004268ea
jmp 0x50c024
mov dword [ebp - 0x5314], str.OMA_DRM
mov dword [ebp - 0x5340], 1
jmp 0x50c2db
mov edx, dword [ebp - 0x5324]
mov eax, dword [ebp - 0x531c]
call fcn.00575a44
test eax, eax
jne 0x50c2db
mov edx, dword [ebp - 0x5324]
mov eax, dword [ebp - 0x531c]
call fcn.00575270
test eax, eax
jne 0x50c2db
cmp dword [0x5af06c], 1
jbe 0x50c024
mov dword [0x611418], 2
mov dword [0x611414], 5
mov eax, ebx
call fcn.004266af
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x5334]
mov dword [esp + 4], eax
mov dword [esp], str._CENC_ISMA__TrackID__d_encrypted_with_unknown_scheme__s___skipping_n
jmp 0x50c627
mov eax, dword [ebp - 0x5320]
cmp dword [eax + 0xc], 0x69414543
jne 0x50c6eb
mov dword [esp + 8], 5
mov dword [esp + 4], 0x5f8a65
mov eax, dword [ebp - 0x5314]
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll__strnicmp
mov ebx, dword [ebp - 0x5314]
test eax, eax
jne 0x50c36f
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
lea esi, [ebp - 0x52ec]
lea edx, [eax - 5]
lea eax, [ebx + 5]
mov dword [esp], 0x64
mov ecx, esi
call fcn.00428f16
lea edi, [ebp - 0x4ee4]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x5320]
cmp dword [eax + 0xc], 0x69414543
jne 0x50c631
mov eax, dword [ebp - 0x52dc]
mov dword [ebp - 0x4ed4], eax
mov eax, dword [ebp - 0x52d8]
jmp 0x50c4a8
mov dword [esp + 4], str.AudioKey
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
test eax, eax
jne 0x50c3ce
mov esi, dword [ebp - 0x5314]
mov dword [esp], str.HOME
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov dword [esp + 4], eax
lea ebx, [ebp - 0x52ec]
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
mov dword [esp + 4], str._.kms_data
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcat
mov edx, 0x5f8a84
mov eax, ebx
call fcn.00427968
mov ebx, eax
test eax, eax
jne 0x50c3ed
jmp 0x50c4b3
mov dword [esp + 4], str.VideoKey
mov eax, dword [ebp - 0x5314]
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
test eax, eax
je 0x50c383
jmp 0x50c4e7
mov dword [esp], ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
test eax, eax
jne 0x50c417
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x400
lea edi, [ebp - 0x52ec]
mov dword [esp], edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fgets
test eax, eax
jne 0x50c41b
xor esi, esi
jmp 0x50c478
mov dword [esp], edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov byte [ebp + eax - 0x52ed], 0
mov dword [esp + 4], esi
mov dword [esp], edi
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
test eax, eax
jne 0x50c3ed
xor esi, esi
lea eax, [ebp - 0x5308]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x5f8a8f
mov dword [esp], ebx
call fcn.005ae208
test eax, eax
je 0x50c46e
mov eax, dword [ebp - 0x5308]
mov byte [ebp + esi - 0x5304], al
inc esi
cmp esi, 0x18
jne 0x50c43d
xor eax, eax
cmp esi, 0x18
sete al
mov esi, eax
mov eax, ebx
call fcn.00425b84
test esi, esi
je 0x50c4b3
lea edi, [ebp - 0x4ee4]
lea esi, [ebp - 0x52fc]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x5304]
mov dword [ebp - 0x4ed4], eax
mov eax, dword [ebp - 0x5300]
mov dword [ebp - 0x4ed0], eax
jmp 0x50c631
cmp dword [0x5af06c], 0
je 0x50c024
mov dword [0x611418], 1
mov dword [0x611414], 5
mov eax, dword [ebp - 0x5334]
mov dword [esp + 4], eax
mov dword [esp], str._CENC_ISMA__Couldnt_load_MPEG4IP_ISMACryp_keys_for_TrackID__d_n
jmp 0x50c558
cmp dword [ebp - 0x5330], 0
jne 0x50c631
mov dword [esp + 4], str.urn:gpac:isma:encryption_scheme
mov eax, dword [ebp - 0x5310]
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll__stricmp
test eax, eax
je 0x50c542
cmp dword [0x5af06c], 2
jbe 0x50c024
mov dword [0x611418], 3
mov dword [0x611414], 5
mov eax, dword [ebp - 0x5334]
mov dword [esp + 4], eax
mov dword [esp], str._CENC_ISMA__TrackID__d_does_not_contain_decryption_keys___skipping_n
jmp 0x50c558
mov edx, 0x5f826d
mov eax, dword [ebp - 0x5314]
call fcn.00427968
test eax, eax
jne 0x50c562
jmp 0x50c50e
call fcn.004268ea
jmp 0x50c024
call fcn.00425b84
mov eax, dword [ebp - 0x4ee8]
mov dword [ebp - 0x5348], eax
mov eax, dword [ebp - 0x5314]
call fcn.00506d0d
mov ebx, eax
test eax, eax
je 0x50c5eb
mov esi, dword [eax]
test esi, esi
je 0x50c5e2
mov edi, dword [esi + 4]
xor edx, edx
cmp edx, edi
je 0x50c5e2
mov dword [ebp - 0x5328], edx
mov eax, esi
call fcn.00425c8e
mov ecx, dword [eax + 4]
cmp dword [ebx + 4], 0
mov edx, dword [ebp - 0x5328]
je 0x50c5b3
test ecx, ecx
je 0x50c5bb
cmp dword [ebp - 0x5348], ecx
jne 0x50c5df
lea edi, [ebp - 0x4ee4]
lea esi, [eax + 8]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
mov edx, dword [eax + 0x18]
mov dword [ebp - 0x4ed4], edx
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x4ed0], eax
jmp 0x50c5e2
inc edx
jmp 0x50c58f
mov eax, ebx
call fcn.00506ca7
jmp 0x50c631
cmp dword [0x5af06c], 0
je 0x50c024
mov dword [0x611418], 1
mov dword [0x611414], 5
mov eax, dword [ebp - 0x5314]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4ee8]
mov dword [esp + 4], eax
mov dword [esp], str._CENC_ISMA__Couldnt_load_TrackID__d_keys_in_GPAC_DRM_file__s_n
call fcn.004268ea
jmp 0x50c024
mov ebx, dword [ebp - 0x5314]
test ebx, ebx
je 0x50c695
cmp byte [ebp - 0x4ec4], 0
je 0x50c695
lea esi, [ebp - 0x4ec4]
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x50c695
cmp dword [0x5af06c], 1
jbe 0x50c695
mov dword [0x611418], 2
mov dword [0x611414], 5
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov eax, dword [ebp - 0x5334]
mov dword [esp + 4], eax
mov dword [esp], str._CENC_ISMA__KMS_URI_for_TrackID__d_Mismatch:___s__in_file_vs___s__in_licence_n
call fcn.004268ea
mov ebx, dword [ebp - 0x5314]
cmp dword [ebp - 0x5330], 0
jne 0x50c6c6
test ebx, ebx
je 0x50c6d5
mov dword [esp + 8], 5
mov dword [esp + 4], 0x5f8a65
mov dword [esp], ebx
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
jne 0x50c6cf
jmp 0x50c6d5
test ebx, ebx
jne 0x50c6cf
mov ebx, 0x5f8971
mov dword [esp + 4], ebx
jmp 0x50c6dd
mov dword [esp + 4], str.self_contained
lea eax, [ebp - 0x4ec4]
mov dword [esp], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
xor ecx, ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ecx
lea eax, [ebp - 0x4eec]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x531c]
mov dword [esp], eax
mov eax, dword [ebp - 0x533c]
call eax
mov dword [ebp - 0x5328], eax
test eax, eax
je 0x50c024
cmp dword [ebp - 0x5340], 0
je 0x50c75e
mov ecx, 1
mov edx, 0x69736f32
mov eax, dword [ebp - 0x531c]
call fcn.004a2405
mov dword [ebp - 0x5328], eax
test eax, eax
jne 0x50c75e
xor ecx, ecx
mov edx, 0x6f646366
mov eax, dword [ebp - 0x531c]
call fcn.004a2518
mov dword [ebp - 0x5328], eax
cmp dword [ebp - 0x5344], 0
je 0x50c7c8
xor ebx, ebx
mov eax, dword [ebp - 0x531c]
mov eax, dword [eax + 0x28]
mov esi, dword [eax + 0x14]
test esi, esi
je 0x50c7ab
mov eax, dword [esi + 4]
cmp ebx, eax
jae 0x50c7a7
mov edx, ebx
mov eax, esi
call fcn.00425c8e
mov edi, eax
cmp dword [eax], 0x70737368
jne 0x50c7a4
mov edx, ebx
mov eax, esi
call fcn.00425e11
mov eax, edi
call fcn.0049747b
dec ebx
inc ebx
jmp 0x50c769
test eax, eax
jne 0x50c7c0
mov eax, esi
call fcn.00425c2c
mov eax, dword [ebp - 0x531c]
mov eax, dword [eax + 0x28]
xor edx, edx
mov dword [eax + 0x14], edx
xor eax, eax
mov dword [ebp - 0x5328], eax
cmp dword [ebp - 0x5320], 0
je 0x50c7dc
mov eax, dword [ebp - 0x5320]
call fcn.00506ca7
mov eax, dword [ebp - 0x5328]
add esp, 0x536c
pop ebx
pop esi
pop edi
pop ebp
ret