Function at 0x10039250
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x10145ca8]
sub esp, 0x108
test eax, eax
jne 0x100394a3
push ebx
push esi
mov esi, dword [sym.imp.MSVCR80.dll_getenv]
push str.XML_DEBUG_CATALOG
call esi
add esp, 4
test eax, eax
mov ebx, 1
je 0x10039284
mov dword [0x10145c98], ebx
call fcn.10040a90
push eax
mov dword [0x10145ca4], eax
mov dword [0x10145ca8], ebx
call fcn.10040ae0
push str.XML_DEBUG_CATALOG
call esi
add esp, 8
test eax, eax
je 0x100392ae
mov dword [0x10145c98], ebx
mov eax, dword [0x10145ca0]
test eax, eax
jne 0x10039492
push edi
push str.XML_CATALOG_FILES
call esi
mov esi, eax
add esp, 4
test esi, esi
jne 0x10039370
push str.libxml2.dll
call sub.KERNEL32.dll_GetModuleHandleA
test eax, eax
jne 0x100392ec
push eax
call sub.KERNEL32.dll_GetModuleHandleA
test eax, eax
je 0x1003936b
push 0xff
lea ecx, [esp + 0x18]
push ecx
push eax
call sub.KERNEL32.dll_GetModuleFileNameA
test eax, eax
je 0x1003936b
mov cl, byte [esp + eax + 0x14]
cmp cl, 0x5c
lea eax, [esp + eax + 0x14]
je 0x10039321
lea ecx, [ecx]
lea edx, [esp + 0x14]
cmp eax, edx
jbe 0x10039321
mov cl, byte [eax - 1]
dec eax
cmp cl, 0x5c
jne 0x10039310
lea ecx, [esp + 0x14]
cmp eax, ecx
je 0x1003936b
mov edi, dword [sym.imp.MSVCR80.dll_strncpy]
lea edx, [esp + 0x113]
sub edx, eax
push edx
push str...etccatalog
push eax
call edi
lea eax, [esp + 0x20]
push eax
call fcn.10037330
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1003936b
push 0xff
push esi
push str.file:___etc_xml_catalog
call edi
push esi
call dword [0x1013f8a8]
add esp, 0x10
mov esi, str.file:___etc_xml_catalog
mov ecx, dword [0x1013fcec]
push ecx
call fcn.100376c0
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x10], edi
je 0x10039491
cmp byte [esi], 0
lea edx, [edi + 0x3c]
mov ebx, esi
mov dword [esp + 0xc], edx
je 0x1003948b
push ebp
mov al, byte [ebx]
cmp al, 0x20
je 0x100393b2
cmp al, 9
jl 0x100393ae
cmp al, 0xa
jle 0x100393b2
cmp al, 0xd
jne 0x100393b5
inc ebx
jmp 0x100393a0
mov al, byte [ebx]
test al, al
je 0x1003948a
mov ecx, ebx
cmp al, 0x20
je 0x100393d9
cmp al, 9
jl 0x100393cd
cmp al, 0xa
jle 0x100393d9
cmp al, 0xd
je 0x100393d9
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x100393c1
mov eax, ebx
sub eax, ecx
push eax
push ecx
call fcn.1002b2e0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x10039481
mov edi, dword [0x1013fcec]
push 0x2c
call dword [0x1013f8ac]
mov esi, eax
xor eax, eax
add esp, 4
cmp esi, eax
jne 0x10039436
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.10029830
add esp, 0x44
xor esi, esi
jmp 0x10039465
push ebp
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.1002b330
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
test esi, esi
mov ecx, dword [esp + 0x10]
mov dword [ecx], esi
je 0x10039473
mov dword [esp + 0x10], esi
push ebp
call dword [0x1013f8a8]
mov edi, dword [esp + 0x18]
add esp, 4
cmp byte [ebx], 0
jne 0x100393a0
pop ebp
mov dword [0x10145ca0], edi
pop edi
mov edx, dword [0x10145ca4]
push edx
call fcn.10040b00
add esp, 4
pop esi
pop ebx
add esp, 0x108
ret