Function at 0x404ab0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x415cd0
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push esi
push edi
mov eax, dword [0x41b068]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov ecx, 0x4f7dec
lea esi, [esp + 0xc]
call fcn.004052a0
mov dword [esp + 0x30], 0
mov eax, dword [0x4f7dec]
mov edx, dword [eax + 0xc]
mov ecx, 0x4f7dec
call edx
add eax, 0x10
mov dword [esp + 0x10], eax
mov byte [esp + 0x30], 1
cmp dword [ebp + 8], 0
je 0x404b73
mov esi, dword [esp + 0xc]
cmp dword [esi - 4], 1
mov edi, dword [esi - 0xc]
jle 0x404b30
mov eax, edi
push eax
lea ecx, [esp + 0x10]
push ecx
call fcn.00405310
mov esi, dword [esp + 0xc]
mov eax, dword [ebp + 8]
lea edx, [ebp + 0xc]
push edx
push eax
push edi
push esi
call fcn.00406c36
add esp, 0x10
test esi, esi
jne 0x404b4a
xor eax, eax
jmp 0x404b65
mov eax, esi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404b50
sub eax, edx
sar eax, 1
js 0x404be6
cmp eax, dword [esi - 8]
jg 0x404be6
mov dword [esi - 0xc], eax
mov word [esi + eax*2], 0
lea ecx, [esp + 0xc]
push ecx
call fcn.00405080
mov edx, dword [esp + 0xc]
xor eax, eax
cmp ebx, eax
je 0x404c4b
cmp dword [edx - 0xc], eax
mov esi, vtable._com_error.0
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], esi
je 0x404bf0
lea edi, [esp + 0x14]
mov byte [esp + 0x30], 2
call fcn.00405610
push eax
mov eax, dword [esp + 0x10]
push ebx
push eax
push 0x419204
lea edi, [esp + 0x20]
call fcn.00405420
mov byte [esp + 0x40], 1
mov eax, dword [esp + 0x2c]
add esp, 0x10
test eax, eax
mov dword [esp + 0x14], esi
je 0x404c2a
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x404c2a
push 0x80070057
call fcn.00405560
lea edi, [esp + 0x14]
mov byte [esp + 0x30], 3
call fcn.00405610
push eax
push ebx
push str.0x_x__s_n
lea edi, [esp + 0x1c]
call fcn.00405420
mov byte [esp + 0x3c], 1
mov eax, dword [esp + 0x28]
add esp, 0xc
test eax, eax
mov dword [esp + 0x14], esi
je 0x404c2a
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
cmp dword [esp + 0x20], 0
je 0x404c66
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x404c66
mov ecx, dword [esp + 0x20]
push ecx
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x404c66
cmp dword [edx - 0xc], eax
je 0x404c66
mov eax, dword [esp + 0xc]
push eax
push 0x419230
lea edi, [esp + 0x18]
call fcn.00405420
add esp, 8
cmp dword [0x4f8a84], 0
je 0x404c7e
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040810e
add esp, 4
jmp 0x404c92
mov edx, dword [esp + 0x10]
push 0x10
push str.Error
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov byte [esp + 0x30], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404cb7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404cdf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret