Function at 0x503180
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5e8a56
mov eax, dword fs:[0]
push eax
sub esp, 0x128
push ebx
push ebp
push esi
push edi
mov eax, dword [0x65f810]
xor eax, esp
push eax
lea eax, [esp + 0x13c]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [0x66dd30]
mov edx, dword [eax + 0xc]
mov ecx, 0x66dd30
call edx
xor ebx, ebx
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov eax, dword [edi + 0x19c]
mov ebp, dword [esp + 0x14c]
mov dword [esp + 0x144], ebx
mov dword [esp + 0x14], ebx
cmp eax, ebx
je 0x503202
push eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x150]
call fcn.004d07e0
lea ecx, [esp + 0x3c]
push 0xfde9
mov dword [esp + 0x3c], ecx
push eax
lea ecx, [esp + 0x40]
call fcn.00467ac0
mov edx, dword [esp + 0x38]
mov byte [esp + 0x144], 1
cmp edx, ebx
jne 0x503239
xor eax, eax
jmp 0x50324f
mov eax, edx
lea esi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x503240
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x28]
call fcn.00455480
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x3c]
mov byte [esp + 0x144], bl
cmp eax, edx
je 0x503276
push eax
call fcn.00579483
add esp, 4
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov eax, dword [ecx - 0xc]
mov esi, ecx
cmp eax, 0xffffffff
jne 0x503293
push ecx
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
mov edx, dword [ebp]
lea ecx, [esp + 0x18]
push ecx
push eax
push esi
push edx
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [edi + 0x19c], ebx
je 0x5032bb
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov esi, dword [esp + 0x154]
mov eax, dword [edi + 0x8c]
mov edx, dword [edi + 0x50]
mov ecx, dword [esi]
mov ebp, dword [esp + 0x18]
sub edx, eax
add ecx, ebp
cmp ecx, edx
jle 0x5032e9
mov edx, dword [edi + 0x48]
add edx, eax
mov dword [esi], edx
mov eax, dword [edi + 0x98]
add dword [esi + 4], eax
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x1c]
lea edx, [eax + ecx]
mov ecx, dword [esi]
push edx
add ebp, ecx
push ebp
push eax
push ecx
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [edi + 0x94]
add eax, dword [esp + 0x30]
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x154]
push 0x5f3560
mov dword [esi], eax
call fcn.004d0f90
mov edx, dword [edi + 0x1dc]
lea esi, [edi + 0x1d8]
push ebx
push edx
lea eax, [esp + 0x28]
push eax
mov ecx, esi
call fcn.00502f00
mov ecx, dword [esi + 4]
cmp ecx, ebx
je 0x50334d
mov dword [ecx], eax
jmp 0x50334f
mov dword [esi], eax
mov dword [esi + 4], eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x144], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x50337d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x13c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret 0xc