Function at 0x51d330
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x592cd8
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5eb3c0]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
mov eax, vtable.CBkBitmap.0
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x58], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov eax, dword [esp + 0x80]
mov byte [esp + 0x78], 2
mov eax, dword [eax]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [edi + 8]
sub ecx, dword [edi]
mov ebp, eax
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
lea esi, [esp + 0x48]
push eax
push ecx
mov dword [esp + 0x30], ebp
call fcn.00479840
cmp eax, ebx
jne 0x51d3f1
cmp ebp, ebx
je 0x51d3cc
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x51d3db
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
xor eax, eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
mov ecx, dword [edi + 8]
sub ecx, dword [edi]
push eax
push ecx
lea esi, [esp + 0x64]
call fcn.00479840
cmp eax, ebx
jne 0x51d448
cmp ebp, ebx
je 0x51d416
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x60]
cmp eax, ebx
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
je 0x51d427
push eax
call esi
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x51d432
push eax
call esi
xor eax, eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret
mov ecx, dword [esp + 0x80]
mov edx, dword [ecx]
push edx
call dword [sym.imp.GDI32.dll_GetTextColor]
movzx ecx, al
or ecx, 0xfffffe00
movzx edx, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
movzx eax, al
shl ecx, 8
or ecx, eax
mov eax, dword [esp + 0x80]
lea esi, [esp + 0x2c]
mov dword [esp + 0x18], ecx
call fcn.004a1ce0
mov esi, dword [eax]
push esi
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x4c]
push ecx
push ebp
mov dword [esp + 0x28], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [edi + 8]
mov ecx, dword [edi + 4]
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
mov dword [esp + 0x40], edx
sub dword [esp + 0x40], eax
mov edx, dword [edi + 0xc]
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x48], edx
sub dword [esp + 0x48], ecx
push ebp
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x1c], ebx
call sub.gdiplus.dll_GdipCreateFromHDC
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ecx
push ebp
mov ecx, esi
lea ebx, [esp + 0x28]
mov byte [esp + 0x7c], 3
call fcn.004a1ac0
mov edx, dword [esp + 0x8c]
mov eax, dword [esp + 0x88]
push 0x7dffffff
push edx
mov edx, dword [esp + 0x8c]
push eax
lea ecx, [esp + 0x24]
push ecx
push edx
push ebp
lea eax, [esp + 0x50]
mov ecx, esi
mov byte [esp + 0x90], 4
call fcn.0051d610
mov eax, dword [esp + 0x34]
mov esi, dword [sym.imp.GDI32.dll_SelectObject]
add esp, 0x18
push eax
push ebp
call esi
mov ecx, dword [esp + 0x20]
push ecx
push ebp
call esi
mov esi, dword [esp + 0x24]
test esi, esi
je 0x51d55a
mov edx, dword [esi]
push edx
call sub.gdiplus.dll_GdipDeleteFont
push esi
call sub.gdiplus.dll_GdipFree
mov eax, dword [esp + 0x14]
push eax
call sub.gdiplus.dll_GdipDeleteGraphics
mov eax, dword [esp + 0x6c]
test eax, eax
je 0x51d590
mov ecx, dword [esp + 0x68]
imul ecx, dword [esp + 0x64]
test ecx, ecx
jle 0x51d590
mov dl, 0xa
jmp 0x51d580
cmp dword [eax], 0
je 0x51d588
mov byte [eax + 3], dl
add eax, 4
sub ecx, 1
jne 0x51d580
mov ecx, dword [edi + 4]
mov ebx, dword [esp + 0x54]
mov eax, dword [edi + 0xc]
mov edx, dword [edi]
mov edi, dword [edi + 8]
mov esi, dword [esp + 0x80]
mov esi, dword [esi]
push 0xff
push ebx
push 0
push 0
sub eax, ecx
push eax
mov eax, dword [esp + 0x64]
sub edi, edx
push edi
push ecx
push edx
push esi
lea ecx, [esp + 0x6c]
call fcn.00479760
add esp, 0x24
test ebp, ebp
mov esi, eax
je 0x51d5d8
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [esp + 0x60]
test eax, eax
mov edi, dword [sym.imp.GDI32.dll_DeleteObject]
je 0x51d5e9
push eax
call edi
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x51d5f4
push eax
call edi
mov eax, esi
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret