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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x7c
mov eax, dword [0x449030]
xor eax, esp
mov dword [esp + 0x78], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov ebx, ecx
xor esi, esi
cmp ebx, esi
push edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ebx
je 0x4225e0
mov eax, dword [ebx + 8]
cmp eax, esi
mov dword [ebx + 8], esi
jne 0x4225e0
push 0x37
lea ecx, [esp + 0x51]
push esi
push ecx
mov dword [esp + 0x20], esi
mov byte [esp + 0x58], 0
call sub.MSVCR80.dll_memset
mov eax, dword [ebx + 4]
add esp, 0xc
lea edx, [esp + 0xc]
push edx
push eax
mov dword [esp + 0x14], esi
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, esi
je 0x42247e
mov dword [ebx + 8], eax
mov ecx, dword [esp + 0xc]
mov eax, dword [ebx + 4]
lea edx, [esp + 0xc]
push edx
push eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x14], esi
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, esi
je 0x42249f
mov dword [ebx + 8], eax
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0xc]
push edx
push eax
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x64], esi
call sub.gdiplus.dll_GdipGetImagePixelFormat
cmp eax, esi
je 0x4224c0
mov dword [ebx + 8], eax
mov eax, dword [esp + 0xc]
cmp eax, 0x30402
mov edi, 8
jg 0x422559
je 0x422550
cmp eax, 0x21808
jg 0x42252b
je 0x42251f
sub eax, 0x21005
je 0x422570
sub eax, 1
jne 0x4225e0
mov word [esp + 0x5a], 0x10
mov dword [esp + 0x5c], 3
mov dword [esp + 0x74], 0xf800
mov dword [esp + 0x78], 0x7e0
mov dword [esp + 0x7c], 0x1f
jmp 0x4225ae
mov word [esp + 0x5a], 0x18
jmp 0x4225ae
cmp eax, 0x22009
je 0x422546
cmp eax, 0x30101
jne 0x4225e0
mov word [esp + 0x5a], 1
jmp 0x4225ae
mov dword [esp + 0x14], 1
jmp 0x4225a7
mov word [esp + 0x5a], 4
jmp 0x4225ae
cmp eax, 0xe200b
jg 0x4225a0
je 0x4225a7
cmp eax, 0x30803
je 0x422599
cmp eax, 0x61007
jne 0x4225e0
mov word [esp + 0x5a], 0x10
mov dword [esp + 0x5c], 3
mov dword [esp + 0x74], 0x7c00
mov dword [esp + 0x78], 0x3e0
mov dword [esp + 0x7c], 0x1f
jmp 0x4225ae
mov word [esp + 0x5a], di
jmp 0x4225ae
cmp eax, 0x26200a
jne 0x4225e0
mov word [esp + 0x5a], 0x20
push 0x50
call sub.MFC80U.DLL_Ordinal_762
add esp, 4
cmp eax, esi
je 0x4225c3
call fcn.00423210
mov esi, eax
lea eax, [esp + 0x4c]
mov ecx, esi
call fcn.00421310
test al, al
jne 0x4225f6
test esi, esi
je 0x4225e0
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.004322b8
mov esp, ebp
pop ebp
ret 4
cmp word [esi + 0x1a], di
ja 0x42265e
mov edx, dword [ebx + 4]
lea ecx, [esp + 0xc]
push ecx
push edx
mov dword [esp + 0x14], 0
call sub.gdiplus.dll_GdipGetImagePaletteSize
test eax, eax
je 0x422619
mov dword [ebx + 8], eax
mov eax, dword [esp + 0xc]
push eax
call sub.MFC80U.DLL_Ordinal_265
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 4]
add esp, 4
mov edi, eax
push ecx
push edi
push edx
mov dword [esp + 0x50], edi
call sub.gdiplus.dll_GdipGetImagePalette
test eax, eax
je 0x422642
mov dword [ebx + 8], eax
lea ebx, [edi + 8]
mov edi, dword [edi + 4]
call fcn.004215a0
mov eax, dword [esp + 0x44]
push eax
call sub.MFC80U.DLL_Ordinal_266
mov ebx, dword [esp + 0x14]
add esp, 4
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov edx, dword [ebx + 4]
mov dword [esp + 0x24], ecx
lea ecx, [esp + 0x10]
push ecx
xor edi, edi
push edx
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x30], eax
call sub.gdiplus.dll_GdipGetImagePixelFormat
cmp eax, edi
je 0x42268b
mov dword [ebx + 8], eax
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ebx + 4]
push ecx
push 1
lea edx, [esp + 0x28]
push edx
push eax
call sub.gdiplus.dll_GdipBitmapLockBits
cmp eax, edi
je 0x4226ac
mov dword [ebx + 8], eax
movzx eax, word [esi + 0x1a]
imul eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x3c]
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
add eax, eax
add eax, eax
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], eax
cmp ecx, eax
lea eax, [esp + 0x34]
jl 0x4226e0
lea eax, [esp + 0x10]
cmp dword [esi + 0x14], 0
mov edx, dword [eax]
mov dword [esp + 0x10], edx
jle 0x422718
jmp 0x4226f4
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
imul ecx, edi
add ecx, dword [esp + 0xc]
push eax
push ecx
mov ecx, dword [esi + 0x38]
mov edx, dword [ecx + edi*4]
push edx
call sub.MSVCR80.dll_memcpy
add edi, 1
add esp, 0xc
cmp edi, dword [esi + 0x14]
jl 0x4226f0
mov ecx, dword [ebx + 4]
lea eax, [esp + 0x2c]
push eax
push ecx
call sub.gdiplus.dll_GdipBitmapUnlockBits
test eax, eax
je 0x42272d
mov dword [ebx + 8], eax
cmp dword [esp + 0x14], 0
je 0x422739
call fcn.00422770
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x10]
push edx
add eax, 0x1c
mov dword [esp + 0x14], esi
call fcn.0041f7f0
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.004322b8
mov esp, ebp
pop ebp
ret 4