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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x510bd1
mov eax, dword fs:[0]
push eax
sub esp, 0xa8
push ebx
push esi
push edi
mov eax, dword [0x53c1a4]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebx + 0x18]
mov esi, dword [ebx + 0x24]
xor eax, eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov eax, dword [ebx + 0x1c]
or ecx, 0xffffffff
mov dword [esp + 0x48], eax
mov dword [esp + 0x60], eax
mov edx, edi
lea eax, [esp + 0x7c]
mov dword [esp + 0x90], ecx
mov dword [esp + 0x98], ecx
mov ecx, dword [ebx + 0x20]
mov dword [esp + 0x5c], edx
mov edx, esi
push eax
mov eax, ebx
mov dword [esp + 0x84], 2
mov dword [esp + 0x50], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], edx
call fcn.004048b0
mov eax, dword [ebx + 0x118]
mov ecx, dword [ebx + 0x114]
cmp eax, ecx
jne 0x42211d
fldz
jmp 0x422189
jae 0x42212b
mov dword [ebx + 0x118], ecx
mov dword [ebx + 0x114], eax
mov ecx, dword [ebx + 0x11c]
mov eax, dword [ebx + 0x114]
cmp ecx, eax
jae 0x422143
mov dword [ebx + 0x11c], eax
jmp 0x422153
mov edx, dword [ebx + 0x118]
cmp ecx, edx
jbe 0x422153
mov dword [ebx + 0x11c], edx
mov ecx, dword [ebx + 0x11c]
sub ecx, eax
mov dword [esp + 0x2c], ecx
fild dword [esp + 0x2c]
test ecx, ecx
jge 0x42216d
fadd qword [0x523a68]
mov edx, dword [ebx + 0x118]
sub edx, eax
mov dword [esp + 0x2c], edx
fild dword [esp + 0x2c]
test edx, edx
jge 0x422187
fadd qword [0x523a68]
fdivp st(1)
mov eax, dword [esp + 0x4c]
fst qword [esp + 0x2c]
sub eax, edi
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmulp st(1)
call fcn.005075b0
add eax, edi
cmp dword [ebx + 0x128], 0xffffffff
mov dword [esp + 0x4c], eax
je 0x422221
movzx eax, byte [ebx + 0x128]
mov dl, byte [ebx + 0x129]
mov cl, byte [ebx + 0x12a]
or eax, 0xffffff00
movzx edx, dl
shl eax, 8
or eax, edx
movzx ecx, cl
shl eax, 8
lea edx, [esp + 0x18]
or eax, ecx
push edx
push eax
mov dword [esp + 0x20], 0
call sub.gdiplus.dll_GdipCreateSolidFill
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x18]
sub esi, edx
push esi
mov esi, dword [ebp + 8]
sub eax, edi
push eax
mov eax, dword [esi]
push edx
push edi
push ecx
push eax
mov dword [esp + 0x54], ecx
call sub.gdiplus.dll_GdipFillRectangleI
test eax, eax
je 0x422217
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x3c]
push ecx
call sub.gdiplus.dll_GdipDeleteBrush
cmp dword [ebx + 0x140], 0
jle 0x422367
cmp dword [ebx + 0x13c], 0
jle 0x422367
cmp dword [ebx + 0x12c], 0xffffffff
je 0x422367
movzx edx, byte [ebx + 0x12c]
mov cl, byte [ebx + 0x12d]
mov al, byte [ebx + 0x12e]
or edx, 0xffffff00
shl edx, 8
movzx ecx, cl
or edx, ecx
movzx eax, al
shl edx, 8
or edx, eax
lea eax, [esp + 0x14]
lea esi, [esp + 0x38]
mov dword [esp + 0x14], edx
call fcn.00404a00
mov eax, dword [ebx + 0x13c]
mov ecx, dword [ebx + 0x20]
sub ecx, dword [ebx + 0x18]
mov edx, eax
imul edx, eax
mov dword [esp + 0x14], ecx
mov ecx, dword [ebx + 0x140]
fild dword [esp + 0x14]
mov dword [esp + 0x14], edx
cdq
idiv ecx
fadd st(0), st(0)
fild dword [esp + 0x14]
fdivp st(1)
mov edi, dword [ebx + 0x138]
mov dword [esp + 0x18], 0
fstp qword [esp + 0x1c]
mov dword [esp + 0x28], eax
test ecx, ecx
jle 0x42235d
mov esi, dword [esp + 0x60]
fild dword [esp + 0x4c]
mov eax, esi
sub eax, dword [esp + 0x68]
fstp qword [esp + 0x54]
mov dword [esp + 0x24], eax
mov eax, edi
imul eax, edi
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmul qword [esp + 0x1c]
fmul qword [0x523a60]
fadd qword [esp + 0x54]
call fcn.005075b0
mov ecx, dword [esp + 0x24]
lea edx, [ecx + eax]
mov ecx, dword [esp + 0x4c]
cmp edx, ecx
jge 0x422315
mov edx, ecx
mov ecx, dword [ebx + 0x20]
cmp edx, ecx
jge 0x42235d
cmp eax, ecx
jle 0x422322
mov eax, ecx
mov ecx, dword [esp + 0x68]
sub ecx, esi
push ecx
sub eax, edx
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push esi
push edx
mov edx, dword [esp + 0x4c]
push edx
push ecx
call sub.gdiplus.dll_GdipFillRectangleI
test eax, eax
je 0x422348
mov edx, dword [ebp + 8]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x18]
add edi, dword [esp + 0x28]
inc eax
cmp eax, dword [ebx + 0x140]
mov dword [esp + 0x18], eax
jl 0x4222e4
mov eax, dword [esp + 0x3c]
push eax
call sub.gdiplus.dll_GdipDeleteBrush
xor esi, esi
cmp dword [ebx + 0x124], esi
je 0x422514
push 0x54830c
call sub.gdiplus.dll_GdipStringFormatGetGenericTypographic
mov edx, dword [0x54830c]
lea ecx, [esp + 0x1c]
push ecx
push edx
mov dword [0x548310], eax
mov dword [esp + 0x24], esi
call sub.gdiplus.dll_GdipCloneStringFormat
mov dword [esp + 0x20], eax
mov dword [esp + 0xc0], esi
mov eax, dword [esp + 0x1c]
push 1
push eax
call sub.gdiplus.dll_GdipSetStringFormatLineAlign
cmp eax, esi
je 0x4223b8
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0x1c]
push 1
push ecx
call sub.gdiplus.dll_GdipSetStringFormatAlign
cmp eax, esi
je 0x4223cc
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 0xb0]
movzx eax, cl
mov edx, ecx
or eax, 0xffffff00
shr edx, 8
movzx edx, dl
shl eax, 8
or eax, edx
shr ecx, 0x10
movzx ecx, cl
shl eax, 8
lea edx, [esp + 0x18]
or eax, ecx
push edx
push eax
mov dword [esp + 0x40], vtable.Gdiplus::SolidBrush.0
mov dword [esp + 0x20], esi
call sub.gdiplus.dll_GdipCreateSolidFill
mov esi, dword [esp + 0x18]
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], esi
mov byte [esp + 0xc0], 1
mov eax, dword [0x546fac]
mov edx, dword [eax + 0xc]
mov ecx, 0x546fac
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
fld qword [esp + 0x2c]
mov byte [esp + 0xc0], 2
fmul qword [0x523ac0]
call fcn.005075b0
push eax
push 0x51f414
lea edi, [esp + 0x1c]
call fcn.004190d0
mov eax, dword [esp + 0xb4]
add esp, 8
test eax, eax
jne 0x42246d
call fcn.00404aa0
fild dword [ebx + 0x18]
mov edx, dword [ebx + 0x20]
sub edx, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x24]
sub ecx, dword [ebx + 0x1c]
fstp dword [esp + 0x28]
fild dword [ebx + 0x1c]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x54], edx
mov dword [esp + 0x2c], ecx
fstp dword [esp + 0x24]
fld dword [esp + 0x28]
fstp dword [esp + 0x6c]
fld dword [esp + 0x24]
fstp dword [esp + 0x70]
fild dword [esp + 0x54]
fstp dword [esp + 0x74]
fild dword [esp + 0x2c]
fstp dword [esp + 0x78]
mov ecx, dword [edi - 0xc]
test eax, eax
je 0x4224be
mov eax, dword [eax]
jmp 0x4224c0
xor eax, eax
mov edx, dword [esp + 0x1c]
mov ebx, dword [ebp + 8]
push esi
push edx
lea edx, [esp + 0x74]
push edx
push eax
mov eax, dword [ebx]
push ecx
push edi
push eax
call sub.gdiplus.dll_GdipDrawString
test eax, eax
je 0x4224e0
mov dword [ebx + 4], eax
lea eax, [edi - 0x10]
mov byte [esp + 0xc0], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422504
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call sub.gdiplus.dll_GdipDeleteBrush
mov ecx, dword [esp + 0x1c]
push ecx
call sub.gdiplus.dll_GdipDeleteStringFormat
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4