Function at 0x40c930
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4f3898
mov eax, dword fs:[0]
push eax
sub esp, 0xc0
mov eax, dword [0x52b360]
xor eax, esp
mov dword [esp + 0xb8], eax
push ebx
push esi
push edi
mov eax, dword [0x52b360]
xor eax, esp
push eax
lea eax, [esp + 0xd0]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov ebx, ecx
mov eax, dword [ebx + 0x34]
sub eax, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x30]
sub ecx, dword [ebx + 0x28]
push eax
push ecx
push 0
push 0
lea edx, [esp + 0x7c]
push edx
call dword [sym.imp.USER32.dll_SetRect]
lea edi, [esp + 0x24]
mov ecx, ebx
call fcn.004104b0
test dword [ebx + 0xf0], 0x40000
mov edi, dword [esi]
mov dword [esp + 0x18], edi
jne 0x40c9d0
push 0xff
push 0xff
push 0xff
push 0xfe
push esi
lea eax, [esp + 0x80]
call fcn.00403350
xor esi, esi
cmp dword [ebx + 0xdc], esi
je 0x40cda0
xor eax, eax
mov dword [esp + 0xc4], 7
mov dword [esp + 0xc0], esi
mov word [esp + 0xb0], ax
lea ecx, [esp + 0xac]
push ecx
push ebx
mov dword [esp + 0xe0], esi
call fcn.0040c800
cmp dword [esp + 0xc0], esi
je 0x40cb90
mov eax, dword [edi]
lea edx, [esp + 0x1c]
push edx
push eax
mov dword [esp + 0x24], esi
call sub.gdiplus.dll_GdipGetDC
cmp eax, esi
je 0x40ca34
mov dword [edi + 4], eax
mov eax, dword [esp + 0x1c]
mov esi, eax
push eax
mov dword [esp + 0x14], esi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
xor eax, eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov byte [esp + 0xd8], 1
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
push ecx
push esi
lea esi, [esp + 0x84]
call fcn.004010c0
mov edx, dword [esp + 0x7c]
push edx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
mov esi, dword [esp + 0x10]
push 0xcc0020
push eax
push ecx
push esi
sub edx, eax
mov eax, dword [esp + 0x3c]
push edx
sub eax, ecx
push eax
push 0
push 0
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
mov ecx, dword [ebx + 0xdc]
mov edx, dword [ecx]
push 0
mov eax, dword [edx + 0x10]
push 0
push 0
push 0
push 0
push 0
push 0
push edi
push 0
push 0
push 0
push 1
call eax
lea eax, [esp + 0x7c]
call fcn.00401110
lea ecx, [esp + 0x34]
push ecx
mov eax, ebx
call fcn.004101d0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x40]
push 0xcc0020
push eax
push ecx
sub edx, eax
push edi
push edx
mov edx, dword [esp + 0x50]
sub edx, ecx
push edx
mov edx, dword [esp + 0x40]
add eax, edx
push eax
mov eax, dword [esp + 0x40]
add ecx, eax
push ecx
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
push esi
mov esi, dword [esp + 0x1c]
mov ecx, dword [esi]
push ecx
call sub.gdiplus.dll_GdipReleaseDC
test eax, eax
je 0x40cb78
mov dword [esi + 4], eax
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x40cd82
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x40cd82
cmp byte [ebx + 0x259], 0
jne 0x40cbba
mov al, byte [ebx + 0x38]
test al, 2
je 0x40cbba
test al, 4
je 0x40cbba
mov edx, dword [ebx]
mov eax, dword [edx + 0x20]
mov ecx, ebx
call eax
cmp eax, esi
je 0x40cbba
cmp dword [eax + 0x1c], ebx
je 0x40cd86
cmp dword [ebx + 0xac], esi
je 0x40cd86
xor ecx, ecx
mov dword [esp + 0x94], 7
mov dword [esp + 0x90], esi
mov word [esp + 0x80], cx
lea eax, [esp + 0x7c]
mov byte [esp + 0xd8], 2
call fcn.00403bd0
cmp dword [esp + 0x94], 8
mov ecx, dword [esp + 0x80]
jae 0x40cc0b
lea ecx, [esp + 0x80]
mov edx, dword [ebx + 0x24c]
fild dword [ebx + 0x244]
push edx
push ecx
lea esi, [esp + 0x4c]
fstp dword [esp]
call fcn.00405290
lea eax, [esp + 0x1c]
push eax
push 0
push 0
mov dword [esp + 0x28], 0
call sub.gdiplus.dll_GdipCreateStringFormat
mov ecx, dword [ebx + 0xe8]
shr ecx, 2
mov dword [esp + 0x20], eax
test cl, 1
je 0x40cc56
test byte [ebx + 0xb9], 1
je 0x40cc6a
mov edx, dword [esp + 0x1c]
push 1
push edx
call sub.gdiplus.dll_GdipSetStringFormatLineAlign
test eax, eax
je 0x40cc6a
mov dword [esp + 0x20], eax
movzx eax, byte [ebx + 0xb4]
movzx ecx, byte [ebx + 0xb5]
movzx edx, byte [ebx + 0xb6]
or eax, 0xfffffe00
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x10]
lea esi, [esp + 0x34]
call fcn.00405490
mov eax, dword [ebx + 0x34]
sub eax, dword [ebx + 0x2c]
mov ecx, dword [ebx + 0x30]
sub ecx, dword [ebx + 0x28]
push eax
push ecx
push 0
push 0
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [ebx + 0x25c]
mov edx, dword [esp + 0x5c]
mov esi, dword [esp + 0x60]
lea ecx, [eax + edx]
mov dword [esp + 0x10], ecx
fild dword [esp + 0x10]
mov ecx, dword [ebx + 0x260]
lea edi, [ecx + esi]
mov dword [esp + 0x10], edi
fstp dword [esp + 0x4c]
mov edi, dword [esp + 0x64]
fild dword [esp + 0x10]
sub edi, dword [ebx + 0x264]
sub edi, eax
fstp dword [esp + 0x50]
mov eax, dword [ebx + 0xac]
sub edi, edx
mov edx, dword [esp + 0x68]
sub edx, dword [ebx + 0x268]
mov dword [esp + 0x10], edi
fild dword [esp + 0x10]
sub edx, ecx
sub edx, esi
cmp dword [ebx + 0xb0], 8
fstp dword [esp + 0x54]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fstp dword [esp + 0x58]
jb 0x40cd39
mov ecx, dword [ebx + 0x9c]
jmp 0x40cd3f
lea ecx, [ebx + 0x9c]
mov esi, dword [esp + 0x18]
lea edx, [esp + 0x4c]
push edx
push eax
push ecx
lea eax, [esp + 0x40]
lea ecx, [esp + 0x28]
lea edi, [esp + 0x50]
call fcn.00405230
mov eax, dword [esp + 0x38]
push eax
call sub.gdiplus.dll_GdipDeleteBrush
mov ecx, dword [esp + 0x1c]
push ecx
call sub.gdiplus.dll_GdipDeleteStringFormat
mov edx, dword [esp + 0x44]
push edx
call sub.gdiplus.dll_GdipDeleteFont
lea ecx, [esp + 0x7c]
call fcn.004016f0
mov edi, esi
xor esi, esi
cmp dword [esp + 0xc4], 8
jb 0x40cda0
mov eax, dword [esp + 0xb0]
push eax
call fcn.004c8f17
add esp, 4
test byte [ebx + 0xf0], 1
je 0x40ce13
movzx eax, byte [ebx + 0xe4]
fld1
movzx ecx, byte [ebx + 0xe5]
movzx edx, byte [ebx + 0xe6]
or eax, 0xfffffe00
shl eax, 8
or eax, ecx
lea ecx, [esp + 0x10]
push ecx
push esi
shl eax, 8
push ecx
or eax, edx
mov dword [esp + 0x1c], esi
fstp dword [esp]
push eax
call sub.gdiplus.dll_GdipCreatePen1
mov ecx, dword [esp + 0x74]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x78]
dec eax
push eax
mov eax, dword [edi]
dec ecx
push ecx
push esi
push esi
push edx
push eax
call sub.gdiplus.dll_GdipDrawRectangleI
cmp eax, esi
je 0x40ce09
mov dword [edi + 4], eax
mov ecx, dword [esp + 0x10]
push ecx
call sub.gdiplus.dll_GdipDeletePen
mov ecx, dword [esp + 0xd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xb8]
xor ecx, esp
call fcn.004c8f08
mov esp, ebp
pop ebp
ret 4