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

Disassembly:
sub esp, 0x9c
push ebx
mov ebx, dword [sym.imp.USER32.dll_SetRect]
push ebp
push esi
mov esi, dword [esp + 0xac]
push edi
lea ebp, [eax - 0x10]
add eax, 0xfffffff8
push eax
lea edi, [ecx - 0x10]
add ecx, 0xfffffff8
push ecx
push 0xfffffffffffffff8
push 0xfffffffffffffff8
lea eax, [esp + 0x98]
push eax
call ebx
push ebp
push edi
push 0
push 0
lea ecx, [esp + 0xa8]
push ecx
call ebx
cmp byte [esi + 0x2c], 0
mov ecx, dword [0x532410]
mov eax, 0x51eb851f
je 0x4073e1
imul ecx, ecx, 0xfe
lea edx, [esp + 0x10]
push edx
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
movzx edx, byte [esi + 8]
movzx ecx, al
movzx eax, byte [esi + 9]
shl ecx, 8
or ecx, edx
movzx edx, byte [esi + 0xa]
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, edx
xor ebx, ebx
push ecx
mov dword [esp + 0x18], ebx
call sub.gdiplus.dll_GdipCreateSolidFill
mov eax, dword [esp + 0x10]
push ebp
push edi
mov edi, dword [esp + 0xbc]
push ebx
push ebx
push eax
mov esi, eax
mov eax, dword [edi]
push eax
call sub.gdiplus.dll_GdipFillRectangleI
cmp eax, ebx
je 0x4073d6
mov dword [edi + 4], eax
push esi
call sub.gdiplus.dll_GdipDeleteBrush
jmp 0x4075a5
imul ecx, ecx, 0xff
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [esp + 0x14], ecx
fild dword [esp + 0x14]
fdiv qword [0x512598]
fldz
fcom st(1)
fnstsw ax
test ah, 5
jp 0x407410
fstp st(0)
jmp 0x407412
fstp st(1)
fld1
lea edx, [esp + 0x18]
fst dword [esp + 0x20]
push edx
fldz
mov dword [esp + 0x1c], 0
fst dword [esp + 0x28]
fst dword [esp + 0x2c]
fst dword [esp + 0x30]
fst dword [esp + 0x34]
fst dword [esp + 0x38]
fst dword [esp + 0x40]
fst dword [esp + 0x44]
fst dword [esp + 0x48]
fst dword [esp + 0x4c]
fst dword [esp + 0x50]
fst dword [esp + 0x58]
fst dword [esp + 0x5c]
fst dword [esp + 0x60]
fst dword [esp + 0x64]
fst dword [esp + 0x68]
fst dword [esp + 0x70]
fst dword [esp + 0x74]
fst dword [esp + 0x78]
fst dword [esp + 0x7c]
fstp dword [esp + 0x80]
fst dword [esp + 0x3c]
fst dword [esp + 0x54]
fstp dword [esp + 0x84]
fstp dword [esp + 0x6c]
call sub.gdiplus.dll_GdipCreateImageAttributes
mov ecx, dword [esp + 0x18]
push 0
push 0
mov dword [esp + 0x24], eax
lea eax, [esp + 0x28]
push eax
push 1
push 1
push ecx
call sub.gdiplus.dll_GdipSetImageAttributesColorMatrix
test eax, eax
je 0x4074b5
mov dword [esp + 0x1c], eax
mov ebx, dword [esi + 0x34]
mov eax, dword [ebx + 4]
lea edx, [esp + 0x10]
push edx
push eax
mov dword [esp + 0x18], 0
call sub.gdiplus.dll_GdipGetImageWidth
test eax, eax
je 0x4074d5
mov dword [ebx + 8], eax
cmp edi, dword [esp + 0x10]
jae 0x4074e1
mov dword [esp + 0x14], edi
jmp 0x407509
mov ebx, dword [esi + 0x34]
mov edx, dword [ebx + 4]
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x18], 0
call sub.gdiplus.dll_GdipGetImageWidth
test eax, eax
je 0x407501
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov ebx, dword [esi + 0x34]
mov edx, dword [ebx + 4]
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x18], 0
call sub.gdiplus.dll_GdipGetImageHeight
test eax, eax
je 0x407529
mov dword [ebx + 8], eax
cmp ebp, dword [esp + 0x10]
jae 0x407533
mov ecx, ebp
jmp 0x407557
mov ebx, dword [esi + 0x34]
mov ecx, dword [ebx + 4]
lea eax, [esp + 0x10]
push eax
push ecx
mov dword [esp + 0x18], 0
call sub.gdiplus.dll_GdipGetImageHeight
test eax, eax
je 0x407553
mov dword [ebx + 8], eax
mov ecx, dword [esp + 0x10]
mov esi, dword [esi + 0x3c]
test esi, esi
je 0x407563
mov eax, dword [esi + 4]
jmp 0x407565
xor eax, eax
mov edx, dword [esp + 0x18]
push 0
push 0
mov esi, dword [esp + 0xbc]
push edx
mov edx, dword [esi]
push 2
push ecx
mov ecx, dword [esp + 0x28]
push ecx
push 0
push 0
push ebp
push edi
push 0
push 0
push eax
push edx
call sub.gdiplus.dll_GdipDrawImageRectRectI
test eax, eax
je 0x407597
mov dword [esi + 4], eax
mov eax, dword [esp + 0x18]
push eax
call sub.gdiplus.dll_GdipDisposeImageAttributes
xor ebx, ebx
mov edi, esi
test byte [0x5341cc], 1
jne 0x4075e5
or dword [0x5341cc], 1
push 0x534118
mov dword [0x534110], ebx
mov dword [0x534114], ebx
mov dword [0x534130], ebx
mov dword [0x534134], ebx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x4f97a0
call fcn.004c9e97
add esp, 4
mov ecx, dword [0x534134]
push ecx
push edi
lea eax, [esp + 0x90]
call fcn.00406d50
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x9c
ret