Function at 0x51fc5a0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x10c
mov eax, dword [0x53f3c3c]
xor eax, esp
mov dword [esp + 0x108], eax
cmp dword [0x56bce78], 0
jne 0x51fc806
push ebx
push esi
mov esi, dword [sym.imp.MSVCR90.dll_getenv]
push str.XML_DEBUG_CATALOG
call esi
add esp, 4
test eax, eax
je 0x51fc5e1
mov dword [0x56bce68], 1
call fcn.05202f80
mov ebx, 1
push eax
mov dword [0x56bce74], eax
mov dword [0x56bce78], ebx
call fcn.05202fb0
push str.XML_DEBUG_CATALOG
call esi
add esp, 8
test eax, eax
je 0x51fc610
mov dword [0x56bce68], ebx
cmp dword [0x56bce70], 0
jne 0x51fc7f5
push ebp
push edi
push str.XML_CATALOG_FILES
call esi
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x51fc6ce
push str.libxml2.dll
call sub.KERNEL32.dll_GetModuleHandleA
test eax, eax
jne 0x51fc64b
push eax
call sub.KERNEL32.dll_GetModuleHandleA
test eax, eax
je 0x51fc6c9
push 0xff
lea ecx, [esp + 0x1c]
push ecx
push eax
call sub.KERNEL32.dll_GetModuleFileNameA
test eax, eax
je 0x51fc6c9
cmp byte [esp + eax + 0x18], 0x5c
lea eax, [esp + eax + 0x18]
je 0x51fc67f
lea ebx, [ebx]
lea edx, [esp + 0x18]
cmp eax, edx
jbe 0x51fc67f
sub eax, ebx
cmp byte [eax], 0x5c
jne 0x51fc670
lea ecx, [esp + 0x18]
cmp eax, ecx
je 0x51fc6c9
mov edi, dword [sym.imp.MSVCR90.dll_strncpy]
lea edx, [esp + 0x117]
sub edx, eax
push edx
push str...etccatalog
push eax
call edi
lea eax, [esp + 0x24]
push eax
call fcn.051fa5b0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x51fc6c9
push 0xff
push esi
push str.file:___etc_xml_catalog
call edi
push esi
call dword [0x53f2e48]
add esp, 0x10
mov ebp, str.file:___etc_xml_catalog
mov ecx, dword [0x53f328c]
push ecx
mov edi, ebx
call fcn.051fa930
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
test esi, esi
je 0x51fc7f3
cmp byte [ebp], 0
lea edx, [esi + 0x3c]
mov dword [esp + 0x10], edx
je 0x51fc7ed
mov edi, edi
mov al, byte [ebp]
cmp al, 0x20
je 0x51fc713
cmp al, 9
jl 0x51fc70f
cmp al, 0xa
jle 0x51fc713
cmp al, 0xd
jne 0x51fc716
inc ebp
jmp 0x51fc700
mov al, byte [ebp]
test al, al
je 0x51fc7ed
mov ecx, ebp
cmp al, 0x20
je 0x51fc73b
cmp al, 9
jl 0x51fc72f
cmp al, 0xa
jle 0x51fc73b
cmp al, 0xd
je 0x51fc73b
mov al, byte [ebp + 1]
inc ebp
test al, al
jne 0x51fc723
mov eax, ebp
sub eax, ecx
push eax
push ecx
call fcn.051ed350
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x51fc7e3
mov edi, dword [0x53f328c]
push 0x2c
call dword [0x53f2e4c]
mov esi, eax
xor eax, eax
add esp, 4
cmp esi, eax
jne 0x51fc798
push str.allocating_catalog_entry
push str.Memory_allocation_failed_:__s_n
push eax
push eax
push eax
push eax
push str.allocating_catalog_entry
push eax
push eax
push 2
push 2
push 0x14
push eax
push eax
push eax
push eax
push eax
call fcn.051eb890
add esp, 0x44
xor esi, esi
jmp 0x51fc7c7
push ebx
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], 1
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
call fcn.051ed3a0
add esp, 4
mov dword [esi + 0x18], eax
xor eax, eax
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
mov ecx, dword [esp + 0x10]
mov dword [ecx], esi
test esi, esi
je 0x51fc7d5
mov dword [esp + 0x10], esi
push ebx
call dword [0x53f2e48]
mov esi, dword [esp + 0x18]
add esp, 4
cmp byte [ebp], 0
jne 0x51fc700
mov dword [0x56bce70], esi
pop edi
pop ebp
mov edx, dword [0x56bce74]
push edx
call fcn.05202fd0
add esp, 4
pop esi
pop ebx
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.0520b902
add esp, 0x10c
ret