Function at 0x408fe0
Capabilities:
Access peb ldr_data
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x548cd8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5a5084]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 4]
xor ebp, ebp
cmp eax, ebp
je 0x40902f
mov ecx, dword [eax - 4]
lea edi, [eax - 4]
push 0x4077c0
push ecx
push 8
push eax
call fcn.004725cc
push edi
call sub.gdiplus.dll_GdipFree
mov dword [esi + 4], ebp
mov eax, dword [esi]
push eax
lea edx, [esp + 0x1c]
push edx
push esi
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
call fcn.00409210
mov dword [esp + 0x38], ebp
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], ebp
je 0x4091ce
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4091ca
lea eax, [esp + 0x28]
mov ebx, vtable.Gdiplus::PrivateFontCollection.0
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebp
call sub.gdiplus.dll_GdipNewPrivateFontCollection
mov dword [esp + 0x2c], eax
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
push ecx
push edx
call sub.gdiplus.dll_GdipPrivateAddFontFile
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebp
call sub.gdiplus.dll_GdipGetFontCollectionFamilyCount
mov edi, dword [esp + 0x1c]
cmp edi, ebp
mov dword [esp + 0x2c], eax
jg 0x4090db
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x28], ebx
call sub.gdiplus.dll_GdipDeletePrivateFontCollection
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], vtable.Gdiplus::FontCollection.0
jmp 0x4091d6
xor ecx, ecx
mov eax, edi
mov edx, 8
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call sub.gdiplus.dll_GdipAlloc
mov dword [esp + 0x1c], eax
cmp eax, ebp
mov byte [esp + 0x38], 2
je 0x409126
push 0x4077c0
push 0x407a20
push edi
lea ebx, [eax + 4]
push 8
push ebx
mov dword [eax], edi
call fcn.0047263c
jmp 0x409128
xor ebx, ebx
cmp ebx, ebp
mov byte [esp + 0x38], 1
mov dword [esi + 4], ebx
je 0x409193
lea ecx, [esp + 0x20]
push ecx
push ebx
mov eax, edi
lea ecx, [esp + 0x2c]
call fcn.004094a0
test eax, eax
jne 0x40918e
mov eax, dword [esp + 0x20]
cmp eax, ebp
jle 0x40918e
lea edx, [esp + 0x28]
push edx
mov dword [esi + 8], edi
mov dword [esi + 0xc], eax
mov dword [esp + 0x28], vtable.Gdiplus::PrivateFontCollection.0
call sub.gdiplus.dll_GdipDeletePrivateFontCollection
lea eax, [esp + 0x18]
mov dword [esp + 0x24], vtable.Gdiplus::FontCollection.0
call fcn.0044dd60
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
call fcn.00407770
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x28], vtable.Gdiplus::PrivateFontCollection.0
call sub.gdiplus.dll_GdipDeletePrivateFontCollection
lea eax, [esp + 0x18]
mov dword [esp + 0x24], vtable.Gdiplus::FontCollection.0
call fcn.0044dd60
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, dword [esp + 0x18]
mov dword [esp + 0x38], 0xffffffff
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4091f2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret