Function at 0x407030
Capabilities:
Check os version

Disassembly:
sub esp, 0x1a4
mov eax, dword [0x4be0a0]
xor eax, esp
mov dword [esp + 0x19c], eax
mov eax, dword [esp + 0x1ac]
push ebx
push ebp
mov ebp, dword [esp + 0x1b0]
push esi
push edi
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], eax
xor eax, eax
push ecx
xor ebx, ebx
push ebp
mov byte [esp + 0x1f], bl
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
call dword [sym.imp.USER32.dll_GetIconInfo]
test eax, eax
jne 0x40708d
xor al, al
jmp 0x40723e
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x60]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectW]
push 0x118
lea ecx, [esp + 0x90]
push ebx
push ecx
xor edi, edi
call fcn.0047f8f0
add esp, 0xc
lea edx, [esp + 0x88]
push edx
mov dword [esp + 0x8c], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp word [esp + 0x72], 0x20
jne 0x4071a7
cmp dword [esp + 0x8c], 5
je 0x4071a7
mov eax, dword [esp + 0x34]
push eax
call fcn.00406e40
add esp, 4
mov edi, eax
mov edx, dword [edi + 4]
lea ecx, [esp + 0x1c]
push ecx
push edx
mov dword [esp + 0x24], ebx
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, ebx
je 0x407112
mov dword [edi + 8], eax
mov ecx, dword [edi + 4]
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x18]
push eax
push ecx
mov dword [esp + 0x20], ebx
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, ebx
je 0x40712f
mov dword [edi + 8], eax
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x18]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], esi
mov ecx, dword [edi + 4]
push eax
push ecx
call sub.gdiplus.dll_GdipGetImagePixelFormat
cmp eax, ebx
je 0x407158
mov dword [edi + 8], eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x48]
push edx
mov edx, dword [edi + 4]
push eax
push 1
lea ecx, [esp + 0x44]
push ecx
push edx
call sub.gdiplus.dll_GdipBitmapLockBits
cmp eax, ebx
je 0x407179
mov dword [edi + 8], eax
push 0x10
call sub.gdiplus.dll_GdipAlloc
cmp eax, ebx
je 0x4071a1
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x5c]
push edx
mov edx, dword [esp + 0x58]
mov esi, eax
call fcn.00406e00
mov esi, eax
jmp 0x4071d7
xor eax, eax
mov esi, eax
jmp 0x4071d7
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
cmp esi, ebx
je 0x4071d5
lea eax, [esp + 0x18]
push eax
push ebp
mov dword [esi], vtable.Gdiplus::Bitmap.0
mov dword [esp + 0x20], ebx
call sub.gdiplus.dll_GdipCreateBitmapFromHICON
mov ecx, dword [esp + 0x18]
mov dword [esi + 8], eax
mov dword [esi + 4], ecx
jmp 0x4071d7
xor esi, esi
lea edx, [esp + 0x78]
push edx
call fcn.00406f50
add esp, 4
test al, al
je 0x40720a
mov ecx, dword [esp + 0x20]
mov edx, dword [esi + 4]
push ebx
lea eax, [esp + 0x7c]
push eax
push ecx
push edx
call sub.gdiplus.dll_GdipSaveImageToFile
cmp eax, ebx
je 0x407205
mov dword [esi + 8], eax
jmp 0x40720a
mov byte [esp + 0x17], 1
cmp esi, ebx
je 0x407218
mov eax, dword [esi]
mov edx, dword [eax]
push 1
mov ecx, esi
call edx
cmp edi, ebx
je 0x407226
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
mov eax, dword [esp + 0x34]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push eax
call esi
mov ecx, dword [esp + 0x30]
push ecx
call esi
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x1ac]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047d444
add esp, 0x1a4
ret