Function at 0x40d2d0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x54d53c
push eax
mov dword fs:[0], esp
sub esp, 0xe0
push ebx
push ebp
push esi
push edi
mov esi, ecx
mov ecx, dword [esi + 0x20]
mov eax, dword [esi]
xor edi, edi
push edi
push edi
push ecx
mov ecx, esi
call dword [eax + 0x28]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov ebx, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
cmp ebx, eax
jb 0x40d333
xor eax, eax
mov ecx, dword [esp + 0xf0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xec
ret 0x10
xor edi, edi
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
push 2
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], eax
mov eax, dword [esi]
push ecx
mov ecx, esi
mov word [esi + 0x10], di
mov byte [esi + 0x12], 0
call dword [eax + 0x34]
mov eax, dword [esp + 0x1c]
mov bx, ax
and eax, 0x3f
mov ebp, eax
shr bx, 6
cmp ebp, 0x3f
jne 0x40d383
mov edx, dword [esi]
push 4
lea eax, [esp + 0x14]
push eax
mov ecx, esi
mov word [esi + 0x10], di
mov byte [esi + 0x12], 0
call dword [edx + 0x34]
mov ebp, dword [esp + 0x10]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov edx, dword [esp + 0x18]
mov edi, eax
mov eax, ebp
sub eax, edx
add edi, eax
test bx, bx
je 0x40d314
cmp bx, 0x30
je 0x40d3ce
mov edx, dword [esi]
push 1
push 0
push ebp
mov ecx, esi
call dword [edx + 0x28]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
mov edx, dword [esi]
mov ecx, esi
mov edi, eax
call dword [edx + 0x30]
cmp edi, eax
jb 0x40d331
jmp 0x40d314
mov eax, dword [esi]
push 2
lea ecx, [esp + 0x20]
push ecx
mov ecx, esi
mov word [esi + 0x10], 0
mov byte [esi + 0x12], 0
call dword [eax + 0x34]
mov edx, dword [esp + 0x10c]
movzx eax, word [esp + 0x1c]
mov ecx, dword [esp + 0x108]
push edx
mov edx, dword [esp + 0x104]
push ecx
push eax
push edx
lea ecx, [esp + 0x70]
call fcn.0040d030
mov eax, dword [esp + 0x104]
xor ebp, ebp
push eax
lea ecx, [esp + 0x64]
mov dword [esp + 0xfc], ebp
call fcn.0040a4c0
lea ecx, [esp + 0x38]
call fcn.004562e0
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x64]
mov byte [esp + 0xfc], 1
call fcn.0040aef0
lea ecx, [esp + 0x38]
call fcn.00455db0
push eax
mov dword [esp + 0x14], eax
call fcn.004661ba
mov ebx, eax
add esp, 4
cmp ebx, ebp
jne 0x40d489
call fcn.00528076
lea ecx, [esp + 0x38]
call fcn.0040add0
lea ecx, [esp + 0x60]
mov dword [esp + 0xf8], 0xffffffff
call fcn.0040ae10
jmp 0x40d314
push ebx
lea ecx, [esp + 0x3c]
call fcn.00455e00
mov eax, dword [esp + 0x18]
mov edx, dword [esi]
push ebp
push ebp
push eax
mov ecx, esi
call dword [edx + 0x28]
push edi
mov ecx, esi
call fcn.00408bc0
mov eax, dword [esp + 0x18]
mov edx, dword [esi]
push 0
push ebp
push eax
mov ecx, esi
call dword [edx + 0x28]
mov ebp, dword [esp + 0x10]
push ebp
push ebx
mov ecx, esi
call fcn.00408af0
push ebx
call fcn.004660a2
mov eax, dword [esi + 0x14]
mov edx, dword [esi]
add esp, 4
xor ebx, ebx
push ebx
push ebx
push eax
mov ecx, esi
call dword [edx + 0x28]
mov edx, dword [esi]
push 4
lea eax, [esp + 0x14]
push eax
mov ecx, esi
mov word [esi + 0x10], bx
mov byte [esi + 0x12], bl
call dword [edx + 0x34]
mov eax, dword [esi + 0x14]
mov edx, dword [esi]
push ebx
push ebx
push eax
mov ecx, esi
call dword [edx + 0x28]
mov ecx, dword [esp + 0x10]
mov edx, dword [esi]
sub ecx, edi
add ecx, ebp
push 4
lea eax, [esp + 0x24]
mov dword [esp + 0x24], ecx
push eax
mov ecx, esi
mov word [esi + 0x10], bx
mov byte [esi + 0x12], bl
call dword [edx + 0x38]
call fcn.0051fbb3
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x64]
mov byte [esp + 0xfc], 2
call fcn.0040d1b0
lea ecx, [esp + 0x24]
call fcn.0051e4d0
mov ecx, dword [esp + 0x2c]
mov byte [esp + 0xf8], 3
push str.fontwidthratio
push ecx
lea ecx, [esp + 0x2c]
call fcn.0051e6bb
mov eax, dword [esp + 0x2c]
lea edx, [esp + 0x14]
push edx
push eax
lea ecx, [esp + 0x2c]
call fcn.0051e684
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
call fcn.0040b6b0
lea ecx, [esp + 0x24]
mov byte [esp + 0xf8], 2
call fcn.0051e522
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0xf8], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d5c3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x38]
call fcn.0040add0
lea ecx, [esp + 0x60]
mov dword [esp + 0xf8], 0xffffffff
call fcn.0040ae10
mov eax, 1
jmp 0x40d316