Function at 0x409520
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x57ee98
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e68f0]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 4]
lea ebp, [esi + 4]
sub eax, 0x10
push eax
call fcn.0040b6a0
add eax, 0x10
add esp, 4
mov dword [esp + 0x14], eax
xor ebx, ebx
mov dword [esp + 0x44], ebx
lea edi, [esi + 0x2c]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x1c], ebx
call fcn.00401fd0
mov eax, dword [esi]
mov dword [esi + 0x14], 1
mov eax, dword [eax - 0xc]
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
add eax, 8
push eax
call fcn.004093b0
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x18], ebx
mov eax, dword [ecx]
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
cmp ecx, ebx
je 0x409638
mov ecx, dword [esi + 0x28]
mov dword [esp + 0x30], ecx
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], 0xffffffff
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
call fcn.00409770
cmp eax, ebx
mov edx, dword [esi]
mov ecx, dword [edx - 0xc]
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
mov dword [edx + 4], ecx
jle 0x40962f
mov ecx, dword [esi + 0x30]
mov edx, dword [ecx]
mov dword [edx + 0x14], eax
mov edx, dword [esi + 0x30]
mov ecx, eax
sar ecx, 0x10
mov ecx, dword [edx + ecx*4]
and eax, 0xffff
shl eax, 5
cmp dword [ecx + eax + 0x18], ebx
je 0x409646
push str.Root_element_has_sibling
mov ecx, ebp
call fcn.00407cf0
jmp 0x409646
push 0xf
push str.No_root_element
jmp 0x40963f
push 0xe
push str.Empty_document
mov ecx, ebp
call fcn.00408080
mov edi, dword [esp + 0x14]
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x1c], ebx
cmp dword [edi - 0xc], ebx
je 0x4096f9
mov edx, dword [ebp]
cmp dword [edx - 0xc], ebx
jne 0x40967b
lea eax, [esp + 0x14]
push eax
mov ecx, ebp
call fcn.0040b710
jmp 0x4096f9
push 0x5bfecc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.0040b130
push ebp
push eax
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x5c], 1
call fcn.0040b2a0
add esp, 0x18
push eax
mov ecx, ebp
mov byte [esp + 0x48], 2
call fcn.0040b710
mov byte [esp + 0x44], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4096d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x44], bl
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4096f9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esi + 0x34], ebx
je 0x40972b
mov esi, dword [esi + 0x30]
mov eax, dword [esi]
test dword [eax + 0xc], 0x800000
jne 0x40972b
mov eax, dword [eax + 0x14]
cmp eax, ebx
je 0x40972b
mov ecx, eax
sar ecx, 0x10
mov edx, dword [esi + ecx*4]
and eax, 0xffff
shl eax, 5
cmp dword [edx + eax + 0x18], ebx
jne 0x40972b
mov bl, 1
lea eax, [edi - 0x10]
mov dword [esp + 0x44], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40974f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, bl
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret