Function at 0x413918
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x270
push esi
xor esi, esi
cmp dword [0x4c0e1c], esi
push edi
jne 0x413af6
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.GdiPlus.dll
call ebx
mov edi, eax
cmp edi, esi
jne 0x413a13
push 1
push esi
lea eax, [ebp - 4]
push eax
push str._SystemRoot_WinSxS
mov ecx, 0x4c0fb8
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call fcn.0044c8eb
lea eax, [ebp - 0x270]
push eax
push dword [ebp - 4]
lea eax, [ebp - 8]
push eax
call fcn.004926a2
add esp, 0xc
test eax, eax
je 0x413a03
push dword [ebp - 4]
call fcn.0040ea8a
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
pop ecx
cmp word [ebp - 0x244], 0x2e
je 0x4139f0
test byte [ebp - 0x270], 0x10
je 0x4139f0
push dword [ebp - 4]
call esi
mov edi, eax
lea eax, [ebp - 0x244]
push eax
call esi
lea eax, [eax + edi + 0x1e]
push eax
lea ecx, [ebp - 0xc]
call fcn.0043dd9c
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 4]
push str._s_sGdiPlus.dll
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push dword [ebp - 0xc]
call ebx
lea ecx, [ebp - 0xc]
mov edi, eax
call fcn.00437e1a
test edi, edi
jne 0x413a03
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 8]
call fcn.00405248
test eax, eax
jne 0x413992
lea ecx, [ebp - 4]
call fcn.00437e1a
lea ecx, [ebp - 8]
call fcn.00402b8f
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.GdiplusShutdown
push edi
call esi
push str.GdipLoadImageFromFile
push edi
mov dword [0x4c0e20], eax
call esi
push str.GdipDisposeImage
push edi
mov dword [0x4c0e30], eax
call esi
push str.GdipCreateFromHDC
push edi
mov dword [0x4c0e24], eax
call esi
push str.GdipDrawImageRectI
push edi
mov dword [0x4c0e28], eax
call esi
push str.GdipCreateBitmapFromHBITMAP
push edi
mov dword [0x4c0e2c], eax
call esi
push str.GdipCreateHBITMAPFromBitmap
push edi
mov dword [0x4c0e3c], eax
call esi
push str.GdipSaveImageToFile
push edi
mov dword [0x4c0e40], eax
call esi
push str.GdipGetImageEncodersSize
push edi
mov dword [0x4c0e44], eax
call esi
push str.GdipGetImageEncoders
push edi
mov dword [0x4c0e34], eax
call esi
push str.GdipDrawImageI
push edi
mov dword [0x4c0e38], eax
call esi
push str.GdipGetImageWidth
push edi
mov dword [0x4c0e48], eax
call esi
push str.GdipGetImageHeight
push edi
mov dword [0x4c0e4c], eax
call esi
mov ebx, str.GdipDrawImageRectRectI
push ebx
push edi
mov dword [0x4c0e50], eax
call esi
push ebx
push edi
mov dword [0x4c0e54], eax
call esi
push str.GdipSetInterpolationMode
push edi
mov dword [0x4c0e58], eax
call esi
push str.GdiplusStartup
push edi
mov dword [0x4c0e5c], eax
call esi
mov dword [0x4c0e1c], eax
xor esi, esi
pop ebx
cmp dword [0x4c0ee0], esi
jne 0x413b25
cmp dword [0x4c0e30], esi
je 0x413b25
xor eax, eax
mov dword [ebp - 0x20], 1
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
lea eax, [ebp - 0x20]
push eax
push 0x4c0ee0
call dword [0x4c0e1c]
cmp dword [ebp + 8], 0xffffffff
jne 0x413b32
mov eax, dword [0x4c0ee0]
jmp 0x413b4f
cmp dword [ebp + 8], esi
mov dword [ebp - 0x10], esi
je 0x413b4c
mov eax, dword [0x4c0e30]
cmp eax, esi
je 0x413b4c
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 8]
call eax
mov eax, dword [ebp - 0x10]
pop edi
pop esi
leave
ret